catfishdesign
Programmer
I have managed to get the HREF of the frame "MAIN_FRAME" to my mail1.asp page in a new window OK.
BUT if the contents of frame "MAIN_FRAME" is from outside my site then the HREF variable does not work. :-(
Here is my code....
===============================================================
<script LANGUAGE="JavaScript">
function geturl(x) {
var undefined
var test
test = top.frames["main"].frames["MAIN_FRAME"];
main = top.frames["main"].location.href;
if (test==undefined)
{MAIN_FRAME = main;}
else {MAIN_FRAME = top.frames["main"].frames["MAIN_FRAME"].location.href;} **** ERROR HERE if out of site page ****
loc = "mail/mail" + x + ".asp?main=" + main + "&frame=" + MAIN_FRAME;
window.open(loc);
}
</script>
===============================================================
Is there an "onerror" event I can use? I have tried "window.onerror" but it still does not work.
Can I do this better in ASP code rather than javascript?
The "out of site" page returns a "Permission Error" / "Anonymous Routine" when I try to assign that variable.
Someone please help me out or point me to the help I need.
BUT if the contents of frame "MAIN_FRAME" is from outside my site then the HREF variable does not work. :-(
Here is my code....
===============================================================
<script LANGUAGE="JavaScript">
function geturl(x) {
var undefined
var test
test = top.frames["main"].frames["MAIN_FRAME"];
main = top.frames["main"].location.href;
if (test==undefined)
{MAIN_FRAME = main;}
else {MAIN_FRAME = top.frames["main"].frames["MAIN_FRAME"].location.href;} **** ERROR HERE if out of site page ****
loc = "mail/mail" + x + ".asp?main=" + main + "&frame=" + MAIN_FRAME;
window.open(loc);
}
</script>
===============================================================
Is there an "onerror" event I can use? I have tried "window.onerror" but it still does not work.
Can I do this better in ASP code rather than javascript?
The "out of site" page returns a "Permission Error" / "Anonymous Routine" when I try to assign that variable.
Someone please help me out or point me to the help I need.