2 Replies Latest reply on Oct 14, 2006 4:00 PM by Newsgroup_User

    passing javascript values

    Level 7
      ASP Vbscript - Javascript

      Dear All,
      I have two forms; form1 sends information to form2.

      Form1 has a piece of javascript which creates a list of user selections.

      To whit:-
      strValues = strValues + "," +
      document.choiceForm.choiceBox.options .value;

      How do I store that information (strValues) so that it can be retrieved in
      form2. Presumably some type of session variable, or perhaps written to a
      hidden field. But how?

      Any clues greatly appreciated.

      Craig


        • 1. Re: passing javascript values
          Level 7
          FYI

          if anyone's interested, I made a semi solution:-

          In form1 I made a hidden field, myList.

          In the javascript I added:
          document.choiceForm.newList.value=strValues;

          I then triggered the javascript with an onSubmit from the form itself:
          onSubmit="MM_callJS('saveMe()')">

          In form2 I have a request variable in the page: <%= Request("newList") %>


          Seems to work.
          Craig


          • 2. Re: passing javascript values
            Level 7
            Craig wrote:

            > FYI
            >
            > if anyone's interested, I made a semi solution:-
            >
            > In form1 I made a hidden field, myList.
            >
            > In the javascript I added:
            > document.choiceForm.newList.value=strValues;
            >
            > I then triggered the javascript with an onSubmit from the form itself:
            > onSubmit="MM_callJS('saveMe()')">

            why not:

            onSubmit="saveMe()">

            ?

            Mick

            >
            > In form2 I have a request variable in the page: <%= Request("newList") %>
            >
            >
            > Seems to work.
            > Craig
            >
            >