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



I'm no ASP expert, but it appears as though you need to put your code into a
function, and then call the function from the button.

For example:
Private Function SendX10(sCode, sCommand)
Set ObjReference = Server.CreateObject("Example1.x10test")
objReference.sendx10 sCode, sCommand
End Function

And then in the button tag, add:
"OFF")

Hope this helps,

Glenn Sullivan, MCSE+I  MCDBA
David Clark Company Inc.

-----Original Message-----
From: Tony T [mailto:tony@xxxxxxx]
Sent: Wednesday, December 18, 2002 9:30 AM
To: ukha_d@xxxxxxx 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


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 http://docs.yahoo.com/info/terms/


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.