By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,656 Members | 968 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,656 IT Pros & Developers. It's quick & easy.

Session Variable in JavaScript ?????

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
"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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
Don't use cookies, you can URL encode them to the next page.

Jul 23 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.