[thelist] JavaScript redirect in frame in IE
David Mitchell
dave at dbmdata.com
Mon Nov 10 14:31:05 CST 2003
Here's the scenario. We have a frameset, within the frameset (in the 3rd
frame) there is a link that pops up a JavaScript confirm, notifying the
user if the navigate away from this page data in form fields will be
lost. If they click ok, I want to load the new page within the same
frame. The code works in Moz, but in IE does nothing - no errors,
nothing. I've tried 100 different ways of doing this but IE just sits
there quietly refusing to cooperate.
Here's the function call:
<a href="javascript:void(0);" onClick="confirmSA('1', '0',
'0');">[SELECT ADDRESS (Optional)]</a>
Here's the function:
function confirmSA(ft, fi, edit)
{
var conf = confirm("NOTE: All unsaved form data will be lost if
you proceed.");
if (conf)
{
var url = 'formsmanagement.asp?formtype=' + ft +
'&mode=1 &ref=form&fi=' + fi + '&edit=' + edit;
parent.window.frames[2].document.location.href = url;
}
}
Any ideas? (note the word wrap in the url in above function - not
actually there in the code...)
Thanks,
Dave
More information about the thelist
mailing list