Announcement

Collapse
No announcement yet.

How to simply trigger an event from an ASP page?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to simply trigger an event from an ASP page?

    I would like to be able to trigger an event from an ASP page. The event would be called Close Garage Door. Would anyone be willing to post a quick (if quick is even possible) code snippet on how to do this and I will take it from there.

    TIA

    Pentium 4 1.8 GHz
    512 MB RAM PC2700
    Way2Call Hi-Phone USB
    ATTNV Crystal 16
    Ocelot w/ 8 I/O
    mcs Temperature (Works great!)
    ROC Outlook (Works great!)
    Video / Captures with ConquerCam
    NetCallerID with WAF script (So far so good...)


    ~Bill

    #2
    <pre class="ip-ubbcode-code-pre">
    &lt;%@ Language=VBScript %&gt;
    &lt;HTML&gt;
    &lt;HEAD&gt;
    &lt;/HEAD&gt;
    &lt;BODY&gt;
    &lt;%

    select case Request.Form("submit1")
    case "Close Garage Door"
    hs.triggerevent("CloseDoor")
    Response.Write "Door Closed"
    end select

    %&gt;

    &lt;form name="main" action"_self" method="post"&gt;
    &lt;input type="submit" value="Close Garage Door" id=submit0 name=submit1&gt;
    &lt;/form&gt;

    &lt;/BODY&gt;
    &lt;/HTML&gt;

    </pre>

    -Rupp

    Ever wonder what the speed of lightning would be if it didn't zig zag?
    -Rupp
    sigpic

    Comment


      #3
      Thanks Rupp, I need to do something similar and that will help me get started.

      -Tom

      Visit my HomeSeer at http://68.55.67.82:81 (New Guest Downloads!)
      -Tom

      Visit Kernhome
      Kern Theater Gallery

      (User: guest / Pass: guest)

      Comment


        #4
        I can adapt most anything, just need a little direction and I hate reading things out of books.

        Thank you, AGAIN, Rupp.

        Regards, Bill

        Pentium 4 1.8 GHz
        512 MB RAM PC2700
        Way2Call Hi-Phone USB
        ATTNV Crystal 16
        Ocelot w/ 8 I/O
        mcs Temperature (Works great!)
        ROC Outlook (Works great!)
        Video / Captures with ConquerCam
        NetCallerID with WAF script (So far so good...)


        ~Bill

        Comment


          #5
          Rupp's method gives you complete control of your form processing but if you don't mind HomeSeer handling the form data, construct you form with field names that HomeSeer recognizes:

          &lt;form method="POST"&gt;
          &lt;input type="hidden" name="run_event" value="CloseDoor"&gt;
          &lt;input type="submit" value="Close Garage Door"&gt;
          &lt;/form&gt;

          More information in HomeSeer Help: 8.6 - Controlling devices and events from your own pages

          My example is a little different than the trigger event example in the help page in that it allows the button's text to be different than the event's name that it triggers.

          Paul

          Comment


            #6
            This is working out better than I could have hoped for my my new Sprint PCS color phone!

            THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU

            Pentium 4 1.8 GHz
            512 MB RAM PC2700
            Way2Call Hi-Phone USB
            ATTNV Crystal 16
            Ocelot w/ 8 I/O
            mcs Temperature (Works great!)
            ROC Outlook (Works great!)
            Video / Captures with ConquerCam
            NetCallerID with WAF script (So far so good...)


            ~Bill

            Comment

            Working...
            X