PDA

View Full Version : fmbadhandler and javascript



whystruggle
14-Feb-2006, 01:09 AM
Hi. Great little script, but my form checkboxes pass this.checked to a javascript function with onclick.

I start with something like:
<input name="InputName" type="checkbox" value="CheckedValue" onclick="MyFunction(this.name,this.checked)">

And when fmbadhandler processes things I get this:
<input name="InputName" type="checkbox" value="CheckedValue" onclick="MyFunction(this.name,this.)">

I can probably modify the code myself to disallow modifications to "checked" within on____="" declarations, but I figured that I should make you aware of this. Quite frankly, I'm surprised that I seem to be the first to stumble upon this.

Thanks again for the great script.

russellr
14-Feb-2006, 01:18 AM
Hi,

Thanks for the bug report.

It's tough getting the patterns (regular expressions) exactly right for all the possibilities.

As a workaround, move your "onclick" attribute to the beginning:


<input onclick="MyFunction(this.name,this.checked)" name="InputName" type="checkbox" value="CheckedValue" >


That should avoid the problem.

We'll try to get a fix out ASAP.

russellr
28-Feb-2006, 07:02 AM
Hi,

Just an update on this....

We've decided that we need to replace the regular expressions with a parse for the various tags.

So, it's going to take some time to get this written.

Did the workaround sort out the problem for you?

whystruggle
28-Feb-2006, 03:59 PM
Yes. Moving the onAction statments to the front of the tag as directed did solve the problem.

Thank you!