Forum Moderators: open

Message Too Old, No Replies

Internet Explorer 7 triggers no onclick event in checkbox

This works in other browsers, I think it worked before: error in my code?

         

albo

2:09 pm on Aug 28, 2007 (gmt 0)

10+ Year Member



My form construct is:
<fieldset><legend>Something</legend>

<label for="check1">Label1</label>

<input id="check1" value="Check1 Value" onclick="recalc();" />

<label for="check2">Label2</label>

<input id="check2" value="Check2 Value"
onclick="recalc();" />

</fieldset>
...
In Firefox and Opera, 'recalc()' gets triggered properly by onclick ... I wouldn't know how else to trigger it! In IE7, upon a page viewer selecting either, nada.

...Is there some basic flaw with my code construct?

...or is there a manner in which I may fix it?

I would very much appreciate your advice!

cmarshall

2:57 pm on Aug 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It doesn't like "recalc()" If I rename it to "frecalc()", it works.

albo

3:20 pm on Aug 28, 2007 (gmt 0)

10+ Year Member



Wonder of wonders, yep, it does! I wonder what the explanation would be?

But, until I hear it, I shall rush full steam ahead with frecalc.

...That is, after testing THAT in the other browsers...groan!

Thank you very very much!

cmarshall

3:44 pm on Aug 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I guess recalc() is reserved in IE. I'm not aware of it, but I ain't a stone JS expert.

This kind of thing has caught me before. It can take ages to figure out.