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

Session Variable in JavaScript ?????

mhk
Hi,

Is there any way to create/set Session veriable in JavaScript.

Please let me know if anyone has an idea.

Thanks alot.

Jul 23 '05 #1
7 14262
"mhk" <mh*@nonexistant.com> skrev i meddelandet
news:10*************@corp.supernews.com...
Hi,

Is there any way to create/set Session veriable in JavaScript.

Please let me know if anyone has an idea.

Thanks alot.


No (for standard Ecma-script, AFAIK).

Cookies?

Joakim Braun
Jul 23 '05 #2
mhk


Joakim Braun wrote:
"mhk" <mh*@nonexistant.com> skrev i meddelandet
news:10*************@corp.supernews.com...
Hi,

Is there any way to create/set Session veriable in JavaScript.

Please let me know if anyone has an idea.

Thanks alot.

No (for standard Ecma-script, AFAIK).

Cookies?

Joakim Braun

************************************************** *
Well.. i actually want to pass a value calculated in javaScript to be
used in VbScript.

I mean, when i click a button in ASP page, it calls a JavaScript form
validation function, i that javascript function, i have calculated a
value which i want to access in my VBScript so that i can pass it to
next page after javascript validation.

any idea to handle this situation.

Thanks

Jul 23 '05 #3
"mhk" <mh*@nonexistant.com> wrote in message
news:10*************@corp.supernews.com...


Joakim Braun wrote:
"mhk" <mh*@nonexistant.com> skrev i meddelandet
news:10*************@corp.supernews.com...
Hi,

Is there any way to create/set Session veriable in JavaScript.

Please let me know if anyone has an idea.

Thanks alot.

No (for standard Ecma-script, AFAIK).

Cookies?

Joakim Braun

************************************************** *
Well.. i actually want to pass a value calculated in javaScript to be
used in VbScript.

I mean, when i click a button in ASP page, it calls a JavaScript form
validation function, i that javascript function, i have calculated a
value which i want to access in my VBScript so that i can pass it to
next page after javascript validation.

any idea to handle this situation.


Put the calcualted value in a hidden form field, and submit it to the server

--
Dag.
Jul 23 '05 #4
mhk


Dag Sunde wrote:
"mhk" <mh*@nonexistant.com> wrote in message
news:10*************@corp.supernews.com...

Joakim Braun wrote:

"mhk" <mh*@nonexistant.com> skrev i meddelandet
news:10*************@corp.supernews.com...
Hi,

Is there any way to create/set Session veriable in JavaScript.

Please let me know if anyone has an idea.

Thanks alot.
No (for standard Ecma-script, AFAIK).

Cookies?

Joakim Braun


************************************************ ***
Well.. i actually want to pass a value calculated in javaScript to be
used in VbScript.

I mean, when i click a button in ASP page, it calls a JavaScript form
validation function, i that javascript function, i have calculated a
value which i want to access in my VBScript so that i can pass it to
next page after javascript validation.

any idea to handle this situation.

Put the calcualted value in a hidden form field, and submit it to the server

************************************************** **
Yes ... u r right but the thing is that the calculated value is in form
validation JavaScript function. So... how can i pass that calculated
value through hidden field in a ASP page.

any idea????.

Jul 23 '05 #5
"mhk" <mh*@nonexistant.com> wrote in message
news:10*************@corp.supernews.com...


Dag Sunde wrote:
"mhk" <mh*@nonexistant.com> wrote in message
news:10*************@corp.supernews.com...

Joakim Braun wrote:
"mhk" <mh*@nonexistant.com> skrev i meddelandet
news:10*************@corp.supernews.com...
>Hi,
>
>Is there any way to create/set Session veriable in JavaScript.
>
>Please let me know if anyone has an idea.
>
>Thanks alot.
No (for standard Ecma-script, AFAIK).

Cookies?

Joakim Braun

************************************************ ***
Well.. i actually want to pass a value calculated in javaScript to be
used in VbScript.

I mean, when i click a button in ASP page, it calls a JavaScript form
validation function, i that javascript function, i have calculated a
value which i want to access in my VBScript so that i can pass it to
next page after javascript validation.

any idea to handle this situation.

Put the calcualted value in a hidden form field, and submit it to the server

************************************************** **
Yes ... u r right but the thing is that the calculated value is in form
validation JavaScript function. So... how can i pass that calculated
value through hidden field in a ASP page.

any idea????.


In your form:

...
<input type="hidden" name="myHiddenField" id="myHiddenField" />
...

In your validation script:

...
var hiddenField = document.getElementById("myHiddenField");
hiddenField.value = calculatedValue;
...

In your .ASP script

...
theHiddenValue= Request.Form("myHiddenField")
...

--
Dag.
Jul 23 '05 #6
mhk


Dag Sunde wrote:
"mhk" <mh*@nonexistant.com> wrote in message
news:10*************@corp.supernews.com...

Dag Sunde wrote:

"mhk" <mh*@nonexistant.com> wrote in message
news:10*************@corp.supernews.com...
Joakim Braun wrote:

>"mhk" <mh*@nonexistant.com> skrev i meddelandet
>news:10*************@corp.supernews.com...
>
>
>
>>Hi,
>>
>>Is there any way to create/set Session veriable in JavaScript.
>>
>>Please let me know if anyone has an idea.
>>
>>Thanks alot.
>
>
>No (for standard Ecma-script, AFAIK).
>
>Cookies?
>
>Joakim Braun
>
>

********************************************** *****
Well.. i actually want to pass a value calculated in javaScript to be
used in VbScript.

I mean, when i click a button in ASP page, it calls a JavaScript form
validation function, i that javascript function, i have calculated a
value which i want to access in my VBScript so that i can pass it to
next page after javascript validation.

any idea to handle this situation.
Put the calcualted value in a hidden form field, and submit it to the


server
************************************************ ****
Yes ... u r right but the thing is that the calculated value is in form
validation JavaScript function. So... how can i pass that calculated
value through hidden field in a ASP page.

any idea????.

In your form:

...
<input type="hidden" name="myHiddenField" id="myHiddenField" />
...

In your validation script:

...
var hiddenField = document.getElementById("myHiddenField");
hiddenField.value = calculatedValue;
...

In your .ASP script

...
theHiddenValue= Request.Form("myHiddenField")
...

********************************************
Its working. Thank you Sooooooooo Much.

Jul 23 '05 #7
Don't use cookies, you can URL encode them to the next page.

Jul 23 '05 #8

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

Similar topics

1
by: Joe | last post by:
I am new to web development at all but maintaining a .NET site that utilizes .apsx pages using vbscript, javascript,and C#. There is a function I am doing that I only can find out how to do in...
0
by: SteveS | last post by:
Hello, this problem is driving me nuts! I am using the Content Ratings (RSACi) for my website. The settings strictly "G" rated - No violence, sex, nudity or offensive language. I have a user...
3
by: M Wells | last post by:
Hi All, Just wondering how you go about changing the value of a session cookie via javascript? I have a PHP page that sets a session cookie when it first loads. I'd like to be able to change...
6
by: -D- | last post by:
I'm trying to accomplish the following. I'm trying to get the values for the table rows that are dynamically created to persist through a redirect. Referring URL:...
2
by: Eric | last post by:
Hi, I've a problem with trying to retrieve a session variable in an include file. Basically, the main asp creates a session variable: <% Session("var1") = "Hello" %> And then when I click...
3
by: Enoch Chan | last post by:
I would like to set a Session variable to a value. In Vbscript it should be Session("ZoomValue")=500 How can I set this session variable by using Javascript? Thanks
2
by: Joe Molloy | last post by:
Hi, This isn't a mission critical question but I thought I'dl throw it out there for your feedback as it's a bit curious. I have developed a shopping cart for an application I'm working on...
5
by: rockdale | last post by:
Hi, all: I have a linkbutton and I use javascript to open another webpage in a new window. I also want to set my session variable value when this linkbutton get clicked. These session variable...
4
by: philin007 | last post by:
Hi , I have the following javascript codes: ****************************************** <script language="JavaScript"> <!-- .... ..... if (nextRow >5) {
10
by: sheldonlg | last post by:
Something weird is happening here. I inherited some code that looks like what is shown below. The problem is that when menu1.php is included, the session variables are not known in homepage.php. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...

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.