Ray,

The only way I know to do is through submitting a form or with an AJAX
call.  The AJAX call seems like it would be fairly easy to implement.  

However, as you look to be submitting a form with your JavaScript -
could you not add code to your form processing that checks for certain
hidden form variables to be present and if the variables are present, to
set the appropriate session variables based on the hidden form field
values?

Tom

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ray Hughes
Sent: Wednesday, July 19, 2006 2:14 PM
To: [EMAIL PROTECTED]
Subject: [DFW CFUG] How to set a session variable via a Javascript
function

Hi All,

I could use some help in engineering a way to set a session variable via
a 
Javascript function.

Example:
**********************
<script>
        function GetReal()
      {
        Do Something;
        Do Something;
        Do Something;
        Do Something;
        Do Something;
        Set session.var1 = '1';                         <!---  Numeric
--->
        Set session.var2 = "myString";  <!---  String --->
        document.myDocument.submit();
      }
</script>
**********************

I have a need to set and reset these session variables based on the user
chocies.
Further be able to go back and reuse them.

Anyone have any thoughts.

Regards
Ray

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.HostMySite.com 
  www.teksystems.com/


_______________________________________________
Reply to DFWCFUG:
  [email protected]
Subscribe/Unsubscribe:
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
    http://www.mail-archive.com/list%40list.dfwcfug.org/
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
  www.HostMySite.com
  www.teksystems.com/

Reply via email to