473,563 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't Pass Query String

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="JavaS cript">
<!--

var ar0 = "top.asp";
var ar1 = "side.asp";
var ar2 = "welcome.as p";

var str = location.search ;
var pos = str.indexOf("&" );
if (pos != -1) {
var num = str.substring(p os + 1, str.length);
window["ar" + num] = str.substring(1 , pos);
}

// -->
</SCRIPT>
</HEAD>
<SCRIPT LANGUAGE="JavaS cript">
<!--

document.write(
'<frameset framespacing="0 " border="0" frameborder="0" rows="152,*">',
'<frame name="toprow" scrolling="no" noresize target="maincon tent" src="',
ar0, '" marginwidth="0" marginheight="0 ">',
'<frameset cols="181, *">',
'<frame name="leftcolum n" target="maincon tent" src="', ar1, '"
marginwidth="0" marginheight="0 " scrolling="auto " noresize>',
'<frame name="mainconte nt" 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="JavaS cript">
<!--
var sPath = window.location .pathname;
//var sPage = sPath.substring (sPath.lastInde xOf('\\') + 1);
var sPage = sPath.substring (sPath.lastInde xOf('/') + 1);

if (top.location.h ref.indexOf("de fault.asp") == -1)
top.location.hr ef = "default.as p?" + sPage + "&2";
// -->
</SCRIPT>

Help would be greatly appreciated,
Fox
Jul 23 '05 #1
4 4805
On Tue, 29 Mar 2005 18:21:32 GMT, in comp.lang.javas cript
"news-server.tampabay .rr.com" <fox @ connexions.net> wrote:
| 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="JavaS cript">
| <!--
|
| var ar0 = "top.asp";
| var ar1 = "side.asp";
| var ar2 = "welcome.as p";


Try adding:
var ar2 = "welcome.asp?<% Request.QuerySt ring)";

[snip 2 end]
---------------------------------------------------------------
jn******@yourpa ntsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Jul 23 '05 #2
"Jeff North" <jn******@yahoo .com.au> wrote in message
news:3a******** *************** *********@4ax.c om...
Try adding:
var ar2 = "welcome.asp?<% Request.QuerySt ring)";


[snip]

Don't you mean:

var ar2 = "welcome.asp?<% =Request.QueryS tring()%>";
Jul 23 '05 #3
Fox

"McKirahan" <Ne**@McKirahan .com> wrote in message
news:Y4******** ************@co mcast.com...
"Jeff North" <jn******@yahoo .com.au> wrote in message
news:3a******** *************** *********@4ax.c om...
Try adding:
var ar2 = "welcome.asp?<% Request.QuerySt ring)";


[snip]

Don't you mean:

var ar2 = "welcome.asp?<% =Request.QueryS tring()%>";


I see I did not explain well enough. Thanks, that one
does work, but that is not where my problem is.

My problem is when calling an orphan page with
a URL and query. That orphan page will show up
in the frames as it is supposed to as a child, but the
query is no more.

I need to be able to carry the query from the orphan
to the parent, so that the orphan, when a child,
still has the query value available within it.
This is the script in the orphan pages which makes
them becomes children of the frames when accessed.
When I access them with a query I need that query
to get written into the Javascript so that it can then
become a variable in the parent frame page (default.asp)
I have tried many things and read many web pages but
cannot seem to get the relationship and syntax needed.

<SCRIPT LANGUAGE="JavaS cript">
<!--
var sPath = window.location .pathname;
//var sPage = sPath.substring (sPath.lastInde xOf('\\') + 1);
var sPage = sPath.substring (sPath.lastInde xOf('/') + 1);

if (top.location.h ref.indexOf("de fault.asp") == -1)
top.location.hr ef = "default.as p?" + sPage + "&2";
// -->
</SCRIPT>

Here again is the script in the framed page, which
needs to read and use the Query String in the
third frame or as it is in the script AR2.

<SCRIPT LANGUAGE="JavaS cript">
<!--

var ar0 = "top.asp";
var ar1 = "side.asp";
var ar2 = "welcome.as p";

var str = location.search ;
var pos = str.indexOf("&" );
if (pos != -1) {
var num = str.substring(p os + 1, str.length);
window["ar" + num] = str.substring(1 , pos);
}

// -->
</SCRIPT>
</HEAD>
<SCRIPT LANGUAGE="JavaS cript">
<!--

document.write(
'<frameset framespacing="0 " border="0" frameborder="0" rows="152,*">',
'<frame name="toprow" scrolling="no" noresize target="maincon tent" src="',
ar0, '" marginwidth="0" marginheight="0 ">',
'<frameset cols="181, *">',
'<frame name="leftcolum n" target="maincon tent" src="', ar1, '"
marginwidth="0" marginheight="0 " scrolling="auto " noresize>',
'<frame name="mainconte nt" src="', ar2, '" marginwidth="0"
marginheight="0 " scrolling="auto ">',
'</FRAMESET>',
'</FRAMESET>'
);

// -->
</SCRIPT>

If you can still help me it would be greatly
appreciated. I built alot around this and
am sort of stuck having to solve it.

Regards,
Fox
Jul 23 '05 #4
On Wed, 30 Mar 2005 04:54:21 -0600, in comp.lang.javas cript
"McKirahan" <Ne**@McKirahan .com> wrote:
| "Jeff North" <jn******@yahoo .com.au> wrote in message
| news:3a******** *************** *********@4ax.c om...
|
| > Try adding:
| > var ar2 = "welcome.asp?<% Request.QuerySt ring)";
|
| [snip]
|
| Don't you mean:
|
| var ar2 = "welcome.asp?<% =Request.QueryS tring()%>";

Yeah that too :-)

---------------------------------------------------------------
jn******@yourpa ntsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
23644
by: Matt | last post by:
In ASP, when we pass data between pages, we usually pass by query string. If we pass data by query string, that means we need to use submit button, not by regular button, and the form will pass to the server since it's GET or POST request. But if just form-to-form communication, why we need to send the form to the server? Please help clarify....
3
23609
by: Robert | last post by:
I am having performance issues on a SQL query in Access. My query is accessing and joining several tables (one very large one). The tables are linked ODBC. The client submits the query to the server, separated by several states. It appears the query is retrieving gigs of data from the table and processing the joins on the client. Is there...
4
14221
by: Corey | last post by:
All, I am relatively new to XML and I have what may sound like a dumb question. I want to pass a query string variable to my xml document and filter the output based on that variable. For example, if I type in www.mysite.com?geid=0000123468 I want to display only AccessReview/Report where GEID='0000123468'. I appreciate any help you can...
5
13208
by: Don Seckler | last post by:
I have an update query that runs when a report closes. I have several reports that will need to run the update query with diferent criteria. I'd like to simply make the criteria change in the report vba instead of making different queries. Here's my query sql: UPDATE Draw SET Draw.Billed = Yes WHERE (((Draw.Billed)=No) AND...
2
15206
by: Robert | last post by:
when using the following function to create a pass through query is there a way to set the query property, "Returns Rows" to no. The default is yes. Since we are planning to create the pass through with new parameters in the where clause we need to set it each time. Thanx in advnance. Function CreateSPT(SPTQueryName As String, strSQL As...
1
4279
by: Greg Strong | last post by:
Hello All, Why would brackets be added to the SQL of a pass through query to Oracle? If I paste the debug print of the SQL statement into SQLPlus of Oracle's XE edition it works, and does NOT have brackets around the tablespace preceding the table name. However when I create the pass through query in VB brackets are placed around the...
4
12420
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is this: can Access create the document and place it as an OLE object to the relevant table? Any help is greatly appreciated. Ricky
5
11504
by: dkintheuk | last post by:
Is it possible to set (using VBA) the rowsource for a combo box but have that rowsource come from a pass-through query. I can obviously manually go into the rowsource property and define the query and even set up the odbc string, but if i want to set this using VBA i cannot see how to do this. I know i can set...
3
15883
by: Tim Sprout | last post by:
I want button1_Click on Form1 to send a query using the textBox1.Text string as part of the query. I want to populate a dataGridView from an Access database file. I am trying to build a search box with the textBox1. How do I pass the textBox1.Text string to the query? The query string below gives me one blank row: string strOleDb = "Select...
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.