473,322 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Pass a GET argument from one page to another

I need to have a static html page basically pass all GET arguments from one
page to another. For example, I'm on page A. It has "x=12&y=45". There's
a link on page A that goes to page B. Page B has a link to page C.
Basically what page B needs to do is pass the "x=12&y=45" to page C. It
doesn't need to do anything other than pass it.

How can I do this?
Sep 17 '05 #1
2 6929
"Shabam" <ch*****@yomama-nospam.com> wrote in message
news:vd********************@adelphia.com...
I need to have a static html page basically pass all GET arguments from one page to another. For example, I'm on page A. It has "x=12&y=45". There's a link on page A that goes to page B. Page B has a link to page C.
Basically what page B needs to do is pass the "x=12&y=45" to page C. It
doesn't need to do anything other than pass it.

How can I do this?

Is this what you're looking for?
JavaScript must be enabled for this to work.

http://localhost/page1.htm?x=12&y=45
<html>
<head>
<title>page1.htm</title>
<script type="text/javascript">
function next() {
location.href = "page2.htm" + location.search;
}
</script>
</head>
<body>
<a href="javascript:next()">page2</a>
</body>
</html>
<html>
<head>
<title>page2.htm</title>
<script type="text/javascript">
function next() {
location.href = "page3.htm" + location.search;
}
</script>
</head>
<body>
<a href="javascript:next()">page3</a>
</body>
</html>
<html>
<head>
<title>page3.htm</title>
<script type="text/javascript">
alert(location.search);
</script>
</head>
<body>
</body>
</html>
Sep 17 '05 #2
["Followup-To:" header set to alt.comp.lang.javascript.]
On 2005-09-17, Shabam <ch*****@yomama-nospam.com> wrote:

I need to have a static html page basically pass all GET arguments from one
page to another. For example, I'm on page A. It has "x=12&y=45". There's
a link on page A that goes to page B. Page B has a link to page C.
Basically what page B needs to do is pass the "x=12&y=45" to page C. It
doesn't need to do anything other than pass it.

How can I do this?


pass them using get, and grab from document.location.query using javasccript.

you'll need to unescape() them before using them.

--

Bye.
Jasen
Oct 16 '05 #3

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

Similar topics

4
by: Todd | last post by:
Is it possible to pass an argument by reference through an event in C++ managed code? For example, can I do the following? public __gc class MyClass : public Control { public: __event...
17
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
3
by: Lyn | last post by:
Hi, I have been experiencing a problem passing a LIKE statement in the WHERE argument of a DoCmd.Openform statement. I have posted that issue separately. However, in an attempt to work around...
1
by: beachboy | last post by:
how can pass the login (security info) to secondary application? ASP.NET 1.1 user login to application 1(app1.myapp.com) with their username and password, then they have a link to application 2...
17
by: Rabbit | last post by:
Hi, On my 1st page, i have a function which gets a new ID value and need to transfer to another immediately. which I want to get in 2nd page using Request.form("txtID"), but doesn't work, the...
9
by: mps | last post by:
I want to define a class that has a generic parameter that is itself a generic class. For example, if I have a generic IQueue<Tinterface, and class A wants to make use of a generic class that...
28
by: Bill | last post by:
Hello All, I am trying to pass a struct to a function. How would that best be accomplished? Thanks, Bill
10
by: Robert Dailey | last post by:
Hi, I noticed in Python all function parameters seem to be passed by reference. This means that when I modify the value of a variable of a function, the value of the variable externally from the...
11
by: venkatagmail | last post by:
I have problem understanding pass by value and pass by reference and want to how how they are or appear in the memory: I had to get my basics right again. I create an array and try all possible...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.