The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: ASP / X10



Do this:
<%@ Language=VBScript %>
<HTML>
<HEAD>

      <TITLE>X10 Thingy</TITLE>
</HEAD>

<BODY>
<%
      dim objReference

      if Request("chkLightOff") = "1" Then
            set ObjReference = Server.CreateObject("Example1.x10test")
            objReference.sendx10 "D11", "OFF"
            set objReference=nothing
      end if
%>
      <FORM NAME="frmInput" METHOD="POST" ACTION="X10.asp">
            Light off? <INPUT Type="CHECKBOX" name="chkLightOff"
value="1">
            <br/>
            <INPUT Type="Submit">
      </FORM>
</HTML>

basically, it's all on a single page, and the object only gets created if
the checkbox is checked.....

I don't know what Chris means about functions not being supported "properly"
but Sullivan's suggestion also won't work because the DLL you have is server
side, but the click event is client side.
If you were using Asp.Net then you could "capture" the onclick event
serverside if you wish.

HTH,

Tony B.
> -----Original Message-----
> From: Chris Bond [mailto:chris@xxxxxxx]
> Sent: 18 December 2002 14:38
> To: ukha_d@xxxxxxx > Subject: Re: [ukha_d] ASP / X10
>
>
> Best way in asp would be like this so in effect you just have
> to call an asp
> that has the below code in, but pass x10.asp?code=D11&value=OFF
>
> <%
> Set ObjReference = Server.CreateObject("Example1.x10test")
> objReference.sendx10 Request.QueryString("code"),
> Request.QueryString("Value")
> Set objReference = Nothing
> Response.Redirect "urlyoucamefrom.asp
> %>
>
> Hope this helps
>
> The way Sullivan surgested wont work as it doesnt support functions
> properly - but you could code very similar to what he
> surggested if you
> really wanted.
>
> Kind Regards,
> Chris Bond
>
> ----- Original Message -----
> From: "Tony T" <tony@xxxxxxx>
> To: <ukha_d@xxxxxxx>
> Sent: Wednesday, December 18, 2002 2:29 PM
> Subject: [ukha_d] ASP / X10
>
>
> > Hi all,
> >
> > Wondering if I could get some ha related asp help, please?
> >
> > The problem I've got is that I have created a server-side
> activex dll
> > for controlling x10,
> > Via xap style messages.
> >
> > I can insert the following code into an asp page,
> >
> > Set ObjReference = Server.CreateObject("Example1.x10test")
> > objReference.sendx10 "D11", "OFF"
> >
> > And when the page loads, the light goes off. Seems ok, but it isn't.
> >
> > What I really want is for a button on the page to be
> pressed for off or
> > on,
> > And _then_ the message to be sent.
> >
> > The only way I can see to do this in asp is,
> > Load page without sendx10,
> > have buttons that call objreference.requestx10 "D11", "OFF"
> > This then reloads the page with the the original sendx10
> line embedded.
> >
> > My question is, is this the correct way to tackle something
> like this?
> > Or is there a better way?
> >
> > Any advice would be gratefully appreciated.
> >
> > As you'll realise my knowledge/experience of using asp is nil.
> > It's my first time, so please be gentle ;-)
> >
> > Many thanks
> > Tony T


********************************************************************
      Visit our Internet site at http://www.rbsmarkets.com

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
Regulated by the Financial Services Authority
********************************************************************

http://www.automatedhome.co.uk
Post message: ukha_d@xxxxxxx
Subscribe:  ukha_d-subscribe@xxxxxxx
Unsubscribe:  ukha_d-unsubscribe@xxxxxxx
List owner:  ukha_d-owner@xxxxxxx
List of UKHA Groups here - http://groups.yahoo.com/group/UKHA_Grouplists/


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.