473,320 Members | 1,977 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,320 software developers and data experts.

Use of the same variable on multiple pages

Hi

How do I transfer a variable on one page to another page?

example:

page1.htm
<script language="JavaScript">
var t = 1;
</script>

page2.htm
<script language="JavaScript">
here I want to use the variable t
</script>

is this possible at all, or what can I do instead. It is for use on a CD
/Danny

Jul 20 '05 #1
1 2627
Hello

This can be done, you have to transfer this variable as a parameter of the
next page and then parse it back from the next page.

That is:
page1.htm will pass 'i' to page2.htm this can be done as:
1)page1.htm will forward to page2.htm?i=123
2)in page2.htm you would parse the location.search and fetch 'i' back again

regards,
Elias
"Danny Poulsen" <da***********@nospam.email.dk> wrote in message
news:bj**********@news.cybercity.dk...
Hi

How do I transfer a variable on one page to another page?

example:

page1.htm
<script language="JavaScript">
var t = 1;
</script>

page2.htm
<script language="JavaScript">
here I want to use the variable t
</script>

is this possible at all, or what can I do instead. It is for use on a CD
/Danny

Jul 20 '05 #2

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

Similar topics

0
by: sentinel | last post by:
Hi All, Advice gratefully needed....... I am trying to present the same content on multiple sites, but allowing the style and formatting to be changed via an external CSS style sheet. The...
11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
3
by: Geoff Winsor | last post by:
Hi, I am experiencing a problem with recalling a session variable which stores whether a person is logged in to a "members only" section of a website. This area of the site has been working...
0
by: Nick Jushchyshyn | last post by:
Having a really strange issue with IIS 6 where the session variable does not stay consistant. The first symptom was that database connections (which use a user entered name/PW stored in the...
41
by: Miguel Dias Moura | last post by:
Hello, I am working on an ASP.NET / VB page and I created a variable "query": Sub Page_Load(sender As Object, e As System.EventArgs) Dim query as String = String.Empty ... query =...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
6
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public...
17
by: Control Freq | last post by:
Hi, Not sure if this is the right NG for this, but, is there a convention for the variable names of a Session variable? I am using .NET 2.0 in C#. I am new to all this .NET stuff, So, any...
0
by: zman77 | last post by:
EDIT: -- forgot to mention... I am using Visual Studio 2005, on Win XP, on an intel machine Hi. This is my first post, though I've "lurked" for a while because I find these forums very helpful....
9
by: Animesh K | last post by:
Hello All: I want to have some re-usable variables, which can be used inside (as well as outside) objects. The use of GLOBALS array is one option, but then I will have to keep track of "reserved...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.