Page 1 of 1

[SOLVED] onchange not taking right away in IE

Posted: Thu Dec 14, 2006 9:05 am
by timclaason
I have the following mix of PHP and Javascript (they're radio buttons):

Code: Select all

print("<INPUT TYPE='RADIO' NAME='site' onChange=");?>"window.location.href='updateranks.php?action=inactivate&subact=0';"<? print(" CHECKED>Active");
print("<INPUT TYPE='RADIO' NAME='site' onChange=");?>"window.location.href='updateranks.php?action=inactivate&subact=inactive';"<? print(">Inactive");
This generates the following HTML Code:

Code: Select all

<INPUT TYPE='RADIO' NAME='site' onChange="window.location.href='updateranks.php?action=inactivate&subact=0';" CHECKED>Active
<INPUT TYPE='RADIO' NAME='site' onChange="window.location.href='updateranks.php?action=inactivate&subact=inactive';">Inactive
This code works just fine in Firefox 1.5.0.8 (and presumably other versions, as well), but in IE 6, once I click on the Radio button that's not selected, I have to click somewhere else in the page for the redirect to occur. Has anyone seen this in IE before?

Anyone have any ideas about how to make this work automatically?

Posted: Thu Dec 14, 2006 9:20 am
by feyd
onclick.

Solved

Posted: Thu Dec 14, 2006 9:41 am
by timclaason
Thanks feyd. That worked. You're the best. :D