Forum Moderators: open
I have just finished some IE 6 testing for a control panel I'm making. Since when did "window.location" and "window.location.href" both stop working in IE6?
This is my JS function,
function con (msg, url) {// Check
if (msg == null) { return false; }
if (url == null) { return false; }
// Do
var con = confirm (msg);
// Check
if (con) {
// Go
window.location = url;
}
}
Some things to know,
1) The code inside the if (con) { ... } is deffo running, I put an alert in there.
2) I have tried my current URL method "/some/page/" and a full URL (with the [)....]
3) This works fine in IE7, FF, Camino, Safari.
4) I have tried both window.location and window.location.href.
Anyone?
Also, just done some further testing and none of my functions with formobject.submit() work either. Again, anyone?
Update
More investigation has found the problem.
My links are,
<a href="javascript:void(0);" onclick="<function_call>">
Yes, I know they aren't very accessable, etc, but why does moving the onclick code into the href property make it all work?