473,785 Members | 2,309 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 14287
"mhk" <mh*@nonexistan t.com> skrev i meddelandet
news:10******** *****@corp.supe rnews.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*@nonexistan t.com> skrev i meddelandet
news:10******** *****@corp.supe rnews.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*@nonexistan t.com> wrote in message
news:10******** *****@corp.supe rnews.com...


Joakim Braun wrote:
"mhk" <mh*@nonexistan t.com> skrev i meddelandet
news:10******** *****@corp.supe rnews.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*@nonexistan t.com> wrote in message
news:10******** *****@corp.supe rnews.com...

Joakim Braun wrote:

"mhk" <mh*@nonexistan t.com> skrev i meddelandet
news:10***** ********@corp.s upernews.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*@nonexistan t.com> wrote in message
news:10******** *****@corp.supe rnews.com...


Dag Sunde wrote:
"mhk" <mh*@nonexistan t.com> wrote in message
news:10******** *****@corp.supe rnews.com...

Joakim Braun wrote:
"mhk" <mh*@nonexistan t.com> skrev i meddelandet
news:10***** ********@corp.s upernews.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="myHiddenF ield" id="myHiddenFie ld" />
...

In your validation script:

...
var hiddenField = document.getEle mentById("myHid denField");
hiddenField.val ue = calculatedValue ;
...

In your .ASP script

...
theHiddenValue= Request.Form("m yHiddenField")
...

--
Dag.
Jul 23 '05 #6
mhk


Dag Sunde wrote:
"mhk" <mh*@nonexistan t.com> wrote in message
news:10******** *****@corp.supe rnews.com...

Dag Sunde wrote:

"mhk" <mh*@nonexistan t.com> wrote in message
news:10***** ********@corp.s upernews.com...
Joakim Braun wrote:

>"mhk" <mh*@nonexistan t.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
validatio n 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="myHiddenF ield" id="myHiddenFie ld" />
...

In your validation script:

...
var hiddenField = document.getEle mentById("myHid denField");
hiddenField.val ue = calculatedValue ;
...

In your .ASP script

...
theHiddenValue= Request.Form("m yHiddenField")
...

*************** *************** **************
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
21917
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 javascript (direct url post to variable then close window), however now I need to access a session variable from that javascript. I could do it from a C# page doing the following:
0
1407
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 who also has his "Content Advisor" turned on. For some reason, the session is lost for the user ONLY after he runs a javascript function on the page, then clicks submit. Make sense? If he clicks submit without first running any javascript ,...
3
5977
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 the value of that session cookie in response to a button click in a form, without resubmitting the page. For some reason, the following doesn't seem to work:
6
1585
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: http://www.dwayneepps.com/abr_site/fundingrequest.asp If you click on the "New Transaction" button it will generate a new row for the user to input information. I call a javascript function when the user clicks the "New Transaction" button that redirects to another page that...
2
13557
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 on a button it refers to the include file, which I believe is all client-side code as there are no server <% %> tags.
3
12400
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
6166
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 which is loosely based on the e-commerce example in the quickstarts tutorial. In the cart display I have provided functionality so that when a user clicks on a product name a popup is opened with the full product details displayed.
5
7129
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 is used in the the webpage that in the new window. I do not want pass these variables as parameters to the web page. Can I let the linkbutton execute postback to set the session variable's value and also execute client javascript to open a new...
4
20032
by: philin007 | last post by:
Hi , I have the following javascript codes: ****************************************** <script language="JavaScript"> <!-- .... ..... if (nextRow >5) {
10
313
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. If I comment out the include of menu1.php, then homepage.php sees the session variables. I have done this with and without session_start() in menu1.php. I can't see why it would lose the session variables. tmpl.php: ========= <?php include...
0
9484
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10097
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9957
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8983
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7505
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5518
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
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
3
2887
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.