Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] [OT] Looking for Javascript 3-toggle button
- Date: Sun, 14 Feb 2010 22:56:58 +0900
- From: Dave M G <dave@example.com>
- Subject: Re: [tlug] [OT] Looking for Javascript 3-toggle button
- References: <4B75727C.50501@example.com> <20100212154700.b2e5825e.gstewart@example.com> <4B777835.20804@example.com> <20100214110510.1f577b53.gstewart@example.com> <20100214112157.cef91bdc.gstewart@example.com>
- User-agent: Thunderbird 2.0.0.23 (X11/20090817)
Godwin, Darren, Thank you for your replies. I've implemented the fixes you suggested, but it's still not hitting. What I've got now: (function buttonClicked(threestate) { var images = new Array( "radar_max_green.png", "radar_min_yellow.png", "radar_off_red.png"); var newimage = images.shift(); images.push(newimage); var ctrl = document.getElementById("radar"); ctrl.styles.backgroundImage = newimage; })(); <input type="button" id="radar" onclick="buttonClicked('radar')" style="background-image: url(images/green.png);width:53px;height:53px;border:0;" value="" /> Firebug tells me: ctrl is null buttonClicked(Object { name="threestate"})button_3_stage.js (line 13) button_3_stage.js()button_3_stage.js (line 9) [Break on this error] ctrl.styles.backgroundImage = newimage; button_3_stage.js (line 13) buttonClicked is not defined function onclick(event) { buttonClicked("radar"); }(Object { name="event"})2 (line 2) [Break on this error] buttonClicked("radar"); I don't know why ctrl is null - is it not succeeding in identifying the right div? And how can buttonClicked not be defined? Looks like it is at least being defined, even if it's not doing anything. -- Dave M G
- Follow-Ups:
- Re: [tlug] [OT] Looking for Javascript 3-toggle button
- From: Godwin Stewart
- References:
- [tlug] [OT] Looking for Javascript 3-toggle button
- From: Dave M G
- Re: [tlug] [OT] Looking for Javascript 3-toggle button
- From: Godwin Stewart
- Re: [tlug] [OT] Looking for Javascript 3-toggle button
- From: Dave M G
- Re: [tlug] [OT] Looking for Javascript 3-toggle button
- From: Godwin Stewart
- Re: [tlug] [OT] Looking for Javascript 3-toggle button
- From: Godwin Stewart
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] [OT] Looking for Javascript 3-toggle button
- Next by Date: Re: [tlug] [OT] Looking for Javascript 3-toggle button
- Previous by thread: Re: [tlug] [OT] Looking for Javascript 3-toggle button
- Next by thread: Re: [tlug] [OT] Looking for Javascript 3-toggle button
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links