[SOLVED] onchange not taking right away in IE

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
timclaason
Forum Commoner
Posts: 77
Joined: Tue Dec 16, 2003 9:06 am
Location: WI

[SOLVED] onchange not taking right away in IE

Post 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?
Last edited by timclaason on Thu Dec 14, 2006 9:41 am, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

onclick.
timclaason
Forum Commoner
Posts: 77
Joined: Tue Dec 16, 2003 9:06 am
Location: WI

Solved

Post by timclaason »

Thanks feyd. That worked. You're the best. :D
Post Reply