Click to See Complete Forum and Search --> : Javascript Redirect Problem


Force
09-11-2003, 05:09 PM
I'm using the following javascript to receive a url with parameters and then redirect it. The redirection is going through, but then it looks in the status bar that something is still trying to process, perhaps I've got some kind of loop going?
Any ideas are greatly appreciated.

<script LANGUAGE="Javascript">
function pass(){
var str = location.search;
var bodyFrame = location.href = "https://www.mycfserver.com/ABC/cfl.cfm"+str;
document.write(
'<FRAMESET FRAMEBORDER="0" ROWS="105, *"frameborder="NO" border="0" framespacing="0">',
'<FRAME SRC="top.htm" NAME="top">',
'<FRAMESET FRAMEBORDER="0" COLS="180, *"frameborder="NO" border="0" framespacing="0">',
'<FRAME SRC="html/left/1.htm" NAME="leftFrame">',
'<FRAME SRC="', bodyFrame, '" NAME="mainFrame">',
'</FRAMESET>',
'</FRAMESET>'
);
}

</script>

Fang
09-12-2003, 02:45 AM
You are loading the url using location.href and bodyFrame was not inserted correctly
[PHP]<script LANGUAGE="Javascript">
function pass(){
var str = location.search;
var bodyFrame = "https://www.mycfserver.com/ABC/cfl.cfm"+str;
document.write(
'<FRAMESET FRAMEBORDER="0" ROWS="105, *"frameborder="NO" border="0" framespacing="0">',
'<FRAME SRC="top.htm" NAME="top">',
'<FRAMESET FRAMEBORDER="0" COLS="180, *"frameborder="NO" border="0" framespacing="0">',
'<FRAME SRC="html/left/1.htm" NAME="leftFrame">',
'<FRAME SRC="'+bodyFrame+'" NAME="mainFrame">',
'</FRAMESET>',
'</FRAMESET>'
);
}

</script>