Jump to content

[SOLVED] IE doesn't like checkbox onchange event


michaellunsford

Recommended Posts

Consider the following code:

[code]<input type="checkbox" value="1" onchange="window.open('somepage.php?id=123&amp;val=0','_self');" checked="checked" />[/code]

It validates and works in firefox, opera, camino, and safari, but not IE.

Now, I suppose a popup blocker could be to blame, but they generally announce themselves and this really isn't a popup. It's difficult to test without having access to IE (my windoze computer died).

Would IE like this better?
[code]<form method="get" action="somepage.php">
<input type="hidden" name="id" value="123">
<input type="hidden" name="val" value="0">
<input type="checkbox" value="1" onchange="this.form.submit();" checked="checked" />
</form>[/code]

Other thoughts?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.