Re: Hidden Visibility in IE ? Code not working



Syl said the following on 4/20/2007 12:28 PM:
Hello experts! I am a programmer but I have had very little
experience with JavaScript.

Can somebody *please* tell me why this is working in Netscape, but not
in IE :
http://checkeredshirt.com/form1.html

The checkbox is supposed to toggle a drop down menu.
Click checkbox --> display drop down menu
Un-check checkbox --> do not display drop down menu

Any tips, comments, advice, answers, haiku - would be very very
appreciated. I've already spent too much time trying to get this
sorted! (wierd behaviour in IE - if you click the checkbox, and then
immeditaley click *underneath* the checkbox in the browser window -
the drop down appears!)

IE doesn't fire the onchange event until an element loses focus. It fires it when you click below (it could be above, beside, anywhere) it blurs the element and fires the onchange.

Change your code from onchange to onclick.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.



Relevant Pages

  • Re: Check One CheckBox To Check All CheckBoxes
    ... & to check/uncheck the rest of the CheckBoxes when the CheckBox in the ... Header is checked/unchecked respectively, ... browsers, you can pretty much guarantee that it's because IE is not ... I know how to do it using JavaScript but am ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Check One CheckBox To Check All CheckBoxes
    ... & to check/uncheck the rest of the CheckBoxes when the CheckBox in the ... Header is checked/unchecked respectively, ... browsers, you can pretty much guarantee that it's because IE is not ... I know how to do it using JavaScript but am ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Gridview access from Javascript
    ... Javascript which I would really appreciate some help with. ... determine the row number of the checkbox that was clicked. ... How do I access a control within the gridview's pagertemplate? ... Thanks but I need to be able to access Button1 from Javascript. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Cant change text field value in IE
    ... I have some javascript that updates the text in a text field after ... Click on a keywords group link such as 'Snowboard' (this will ... Click on a checkbox such as 'Snowboard Boots' ...
    (comp.lang.javascript)
  • RE: hide label & checkbox if .....
    ... While the Format event is more commonly used for setting report controls at ... event only fires when the report receives the focus. ... has a unbound Label & unbound Checkbox. ... If would like to HIDE both the label & checkbox from the report, ...
    (microsoft.public.access.reports)