Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
March 22, 2010, 08:28:50 AM
Home
Help
Search
Register
Login
ioBridge.com
ioBridge Community
>
Software
>
Internet Publishing
>
Calling widget via javascript function for image button - needs help
Pages: [
1
]
« previous
next »
Print
Author
Topic: Calling widget via javascript function for image button - needs help (Read 187 times)
laurenell
Newbie
Posts: 4
Calling widget via javascript function for image button - needs help
«
on:
January 27, 2010, 12:49:24 PM »
Okay, I'm not great at javascript and would love some help.
What I'd like:
Graphic button on webpage. Click it and it turns on a relay.
What I did, in the head I have:
function on()
{
widgetSetState('ID', 1);
}
This works fine, what doesn't work is the following. It's quite strange, sometimes it actually works, but the next time it won't.
<FORM>
<p>
<INPUT TYPE="image" src="yes.jpg" name="yes" onclick="yes()" >
</p>
I'm sure I've done something stupid - so any help?
</FORM>
«
Last Edit: January 27, 2010, 01:10:45 PM by laurenell
»
Logged
iobridge
Administrator
Sr. Member
Posts: 413
Re: Calling widget via javascript function for image button
«
Reply #1 on:
January 27, 2010, 01:06:05 PM »
Try:
onClick
Also, do you mean...?
onClick="on()"
Logged
ioBridge Support
Community Team
laurenell
Newbie
Posts: 4
Re: Calling widget via javascript function for image button - needs help
«
Reply #2 on:
January 27, 2010, 05:57:09 PM »
well, still no luck - you were right though I did mean 'on', thanks for the help, I think I'll just not use a form, since I got this to work fine:
<a href="#" onclick="on()"><img src="on.jpg" border="" /></a>
«
Last Edit: January 27, 2010, 06:07:13 PM by laurenell
»
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Announcements
-----------------------------
Software
-----------------------------
=> ioBridge Website
=> Widgets
=> Internet Publishing
=> Actions and Events
=> Data Logging
-----------------------------
Hardware
-----------------------------
=> Modules
=> Interface Boards
=> Hardware in General
-----------------------------
General
-----------------------------
=> Projects
=> Ideas
=> Feature Requests
=> Everything else...
Powered by SMF 1.1.11
|
SMF © 2006-2009, Simple Machines LLC
| ©
2008
ioBridge Corporation
|
RSS Feed
Loading...