mabog Posted February 28, 2010 Share Posted February 28, 2010 I have this (one example created with php) : <OPTION VALUE="54" onClick='window.location.href = "tedit.php?wt=1&wpt=54"';>blaablaa</OPTION> and it works fine in Firefox, but not in IE. Please tell me how to change it to make it work in both? Quote Link to comment https://forums.phpfreaks.com/topic/193689-windowlocation-in-ie-doesnt-work/ Share on other sites More sharing options...
seventheyejosh Posted February 28, 2010 Share Posted February 28, 2010 Try: <option value="54" onclick='window.location.href="tedit.php?wt=1&wpt=54";'>Click Me</option> Your semicolon was outside of your 's Quote Link to comment https://forums.phpfreaks.com/topic/193689-windowlocation-in-ie-doesnt-work/#findComment-1019591 Share on other sites More sharing options...
mabog Posted March 1, 2010 Author Share Posted March 1, 2010 Thanks for your correction (didn't help ) but I think problem is more difficult. There's lot of talk about onClick etc. not working in IE...especially IE6, but there must be a trick around this IE bug... at least for IE8. I just need to open new location address when choosing an option. Quote Link to comment https://forums.phpfreaks.com/topic/193689-windowlocation-in-ie-doesnt-work/#findComment-1019727 Share on other sites More sharing options...
Dennis1986 Posted March 1, 2010 Share Posted March 1, 2010 Try the onChange event for the <select> object instead. I don't think onClick is supported in all browsers on an <option> Quote Link to comment https://forums.phpfreaks.com/topic/193689-windowlocation-in-ie-doesnt-work/#findComment-1019738 Share on other sites More sharing options...
mabog Posted March 1, 2010 Author Share Posted March 1, 2010 Try the onChange event for the <select> object instead. I got it to work. That was the trick. Thanks a lot! Quote Link to comment https://forums.phpfreaks.com/topic/193689-windowlocation-in-ie-doesnt-work/#findComment-1019816 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.