Hi,
Below is a stock script I found which controls a framed environment.
My problem is that if a URL has a query string attached, that string
does not pass through. Can someone please let me know if and
hopefully how, it will be possible to carry a query string through?
This first part here is in the default.asp framed page.
<SCRIPT LANGUAGE="JavaScript">
<!--
var ar0 = "top.asp";
var ar1 = "side.asp";
var ar2 = "welcome.asp";
var str = location.search;
var pos = str.indexOf("&");
if (pos != -1) {
var num = str.substring(pos + 1, str.length);
window["ar" + num] = str.substring(1, pos);
}
// -->
</SCRIPT>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write(
'<frameset framespacing="0" border="0" frameborder="0" rows="152,*">',
'<frame name="toprow" scrolling="no" noresize target="maincontent" src="',
ar0, '" marginwidth="0" marginheight="0">',
'<frameset cols="181, *">',
'<frame name="leftcolumn" target="maincontent" src="', ar1, '"
marginwidth="0" marginheight="0" scrolling="auto" noresize>',
'<frame name="maincontent" src="', ar2, '" marginwidth="0"
marginheight="0" scrolling="auto">',
'</FRAMESET>',
'</FRAMESET>'
);
// -->
</SCRIPT>
Then for any page to appear in the frames
this script is used in that page. But if that
page is called with a query string attached
that string will not pass through without
adjustments that I do not know how to
deal with in either page.
<SCRIPT LANGUAGE="JavaScript">
<!--
var sPath = window.location.pathname;
//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
if (top.location.href.indexOf("default.asp") == -1)
top.location.href = "default.asp?" + sPage + "&2";
// -->
</SCRIPT>
Help would be greatly appreciated,
Fox