Session Variable in JavaScript ?????

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mhk

    #1

    Session Variable in JavaScript ?????

    Hi,

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

    Please let me know if anyone has an idea.

    Thanks alot.

  • Joakim Braun

    #2
    Re: Session Variable in JavaScript ?????

    "mhk" <mhk@nonexistan t.com> skrev i meddelandet
    news:10uhno0qe1 cvub7@corp.supe rnews.com...[color=blue]
    > Hi,
    >
    > Is there any way to create/set Session veriable in JavaScript.
    >
    > Please let me know if anyone has an idea.
    >
    > Thanks alot.[/color]

    No (for standard Ecma-script, AFAIK).

    Cookies?

    Joakim Braun


    Comment

    • mhk

      #3
      Re: Session Variable in JavaScript ?????



      Joakim Braun wrote:
      [color=blue]
      > "mhk" <mhk@nonexistan t.com> skrev i meddelandet
      > news:10uhno0qe1 cvub7@corp.supe rnews.com...
      >[color=green]
      >>Hi,
      >>
      >>Is there any way to create/set Session veriable in JavaScript.
      >>
      >>Please let me know if anyone has an idea.
      >>
      >>Thanks alot.[/color]
      >
      >
      > No (for standard Ecma-script, AFAIK).
      >
      > Cookies?
      >
      > Joakim Braun
      >
      >[/color]
      *************** *************** *************** ******
      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



      Comment

      • Dag Sunde

        #4
        Re: Session Variable in JavaScript ?????

        "mhk" <mhk@nonexistan t.com> wrote in message
        news:10uhp55c0g vfeb3@corp.supe rnews.com...[color=blue]
        >
        >
        > Joakim Braun wrote:
        >[color=green]
        > > "mhk" <mhk@nonexistan t.com> skrev i meddelandet
        > > news:10uhno0qe1 cvub7@corp.supe rnews.com...
        > >[color=darkred]
        > >>Hi,
        > >>
        > >>Is there any way to create/set Session veriable in JavaScript.
        > >>
        > >>Please let me know if anyone has an idea.
        > >>
        > >>Thanks alot.[/color]
        > >
        > >
        > > No (for standard Ecma-script, AFAIK).
        > >
        > > Cookies?
        > >
        > > Joakim Braun
        > >
        > >[/color]
        > *************** *************** *************** ******
        > 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.[/color]

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

        --
        Dag.


        Comment

        • mhk

          #5
          Re: Session Variable in JavaScript ?????



          Dag Sunde wrote:
          [color=blue]
          > "mhk" <mhk@nonexistan t.com> wrote in message
          > news:10uhp55c0g vfeb3@corp.supe rnews.com...
          >[color=green]
          >>
          >>Joakim Braun wrote:
          >>
          >>[color=darkred]
          >>>"mhk" <mhk@nonexistan t.com> skrev i meddelandet
          >>>news:10uhno0 qe1cvub7@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
          >>>
          >>>[/color]
          >>
          >>************* *************** *************** ********
          >>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.[/color]
          >
          >
          > Put the calcualted value in a hidden form field, and submit it to the server
          >[/color]
          *************** *************** *************** *******
          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????.



          Comment

          • Dag Sunde

            #6
            Re: Session Variable in JavaScript ?????

            "mhk" <mhk@nonexistan t.com> wrote in message
            news:10uhrgfpld aq981@corp.supe rnews.com...[color=blue]
            >
            >
            > Dag Sunde wrote:
            >[color=green]
            > > "mhk" <mhk@nonexistan t.com> wrote in message
            > > news:10uhp55c0g vfeb3@corp.supe rnews.com...
            > >[color=darkred]
            > >>
            > >>Joakim Braun wrote:
            > >>
            > >>
            > >>>"mhk" <mhk@nonexistan t.com> skrev i meddelandet
            > >>>news:10uhno0 qe1cvub7@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.[/color]
            > >
            > >
            > > Put the calcualted value in a hidden form field, and submit it to the[/color][/color]
            server[color=blue][color=green]
            > >[/color]
            > *************** *************** *************** *******
            > 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????.
            >
            >[/color]

            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.


            Comment

            • mhk

              #7
              Re: Session Variable in JavaScript ?????



              Dag Sunde wrote:
              [color=blue]
              > "mhk" <mhk@nonexistan t.com> wrote in message
              > news:10uhrgfpld aq981@corp.supe rnews.com...
              >[color=green]
              >>
              >>Dag Sunde wrote:
              >>
              >>[color=darkred]
              >>>"mhk" <mhk@nonexistan t.com> wrote in message
              >>>news:10uhp55 c0gvfeb3@corp.s upernews.com...
              >>>
              >>>
              >>>>Joakim Braun wrote:
              >>>>
              >>>>
              >>>>
              >>>>>"mhk" <mhk@nonexistan t.com> skrev i meddelandet
              >>>>>news:10uhn o0qe1cvub7@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[/color][/color]
              >
              > server
              >[color=green]
              >>************* *************** *************** *********
              >>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????.
              >>
              >>[/color]
              >
              >
              > 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")
              > ...
              >[/color]
              *************** *************** **************
              Its working. Thank you Sooooooooo Much.



              Comment

              • Nikolay

                #8
                Re: Session Variable in JavaScript ?????

                Don't use cookies, you can URL encode them to the next page.

                Comment

                Working...