2
   

Passing a URL query string in frames (javascript)

 
 
Mxyptlk
 
Reply Fri 1 Apr, 2005 07:29 am
Hi,

I am not yet familiar with your rules or how your system is categorized. Please excuse me if I make a mistake in how I am going about posting this. I will be happy to receive criticism if I am posting incorrectly, since I have no intention of abusing the privilege of using this system.

I apologize for double posting. I posted about this same issue in a thread that is quite old. I am guessing that is why it was not responded to. If I were not in a serious position, I would not be trying so hard to get a response. This is the link to the thread with the original post. http://www.able2know.com/forums/viewtopic.php?p=1253502#1253502

I tried to contact Craven de Kere, but I was not allowed to send a PM, because I am new. I tried to PM him because he posted basically this same script I found elsewhere. When searching for help with the script, his posts came up on Google.

I am perfetly willing to pay for help if someone can help me with this.

The following is almost the exact script posted by Craven de kere in the other thread. The difference is very minor.

If anyone can help me, this would be greatly appreciated.

Here is the version of the script I am using. Note that I can use ASP to resolve the querystring. And then use <% =Request.QueryString("stringname") %> .. Unfortunately I have no knowledge of javascript beyond what I can deduce and apply from now learning ASP/ADO. I was hoping and expecting that a querystring, attached to a URL, could be passed through this script with a minimum amount of change. I was also hoping that using ASP would help to keep the javascript as simple as possible (regarding using the ASP to resolve the querystring).


<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>





ORPHANED PAGE SCRIPT
<%@ Language="VBscript" %>
<% RegType = (Request.QueryString("RegType"))
<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>

Thanks,
Dennis (Mxyptlk)
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 2 • Views: 5,010 • Replies: 0
No top replies

 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » Passing a URL query string in frames (javascript)
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.05 seconds on 05/05/2024 at 12:07:18