Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Passing multiple values

Passing multiple values

Scheduled Pinned Locked Moved Web Development
javascripthelp
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Ph ntom
    wrote on last edited by
    #1

    Hi, I have an asp page called main.asp, This page contains some around 30 form elements. When I presses the submit button, I called a JAVASCRIPT method to collect and validate all of the values. After validation I need to pass all of the values to a page called submit.asp which is visible using an IFRAME in main.asp The idea of passing values along with the url and getting them using QueryString is good for small number of elements but for a large number of elements it is not feasible. I need to know how should I get all those form values on submit.asp without passing them with the url I chooses this strategy because I donot want to post my page to because it is a combination of more then 100 elements. Help kindly appreciated. :confused: Thanks. The Phantom.

    R R P S 4 Replies Last reply
    0
    • P Ph ntom

      Hi, I have an asp page called main.asp, This page contains some around 30 form elements. When I presses the submit button, I called a JAVASCRIPT method to collect and validate all of the values. After validation I need to pass all of the values to a page called submit.asp which is visible using an IFRAME in main.asp The idea of passing values along with the url and getting them using QueryString is good for small number of elements but for a large number of elements it is not feasible. I need to know how should I get all those form values on submit.asp without passing them with the url I chooses this strategy because I donot want to post my page to because it is a combination of more then 100 elements. Help kindly appreciated. :confused: Thanks. The Phantom.

      R Offline
      R Offline
      Roger Wright
      wrote on last edited by
      #2

      Using the query string limits you, as you mention. That's why there is a second method supported - POST. Using this method, each element on the form has a name attribute and a value. When you submit it, the target page can access the value of each element by using Variable = Request.Form("Name"). For example, the form

      accepts a single item - the name of the user. In the target page, VerifyUsrName.asp, the script between tags <% Dim strUsr strUsr = Request.Form("usrName") %> will pass the name entered by the user on the form to the variable strUsr on the verification page. Some people think of it as a six-pack; I consider it more of a support group.

      1 Reply Last reply
      0
      • P Ph ntom

        Hi, I have an asp page called main.asp, This page contains some around 30 form elements. When I presses the submit button, I called a JAVASCRIPT method to collect and validate all of the values. After validation I need to pass all of the values to a page called submit.asp which is visible using an IFRAME in main.asp The idea of passing values along with the url and getting them using QueryString is good for small number of elements but for a large number of elements it is not feasible. I need to know how should I get all those form values on submit.asp without passing them with the url I chooses this strategy because I donot want to post my page to because it is a combination of more then 100 elements. Help kindly appreciated. :confused: Thanks. The Phantom.

        R Offline
        R Offline
        Rohit Sinha
        wrote on last edited by
        #3

        Since you can't use GET, and you don't want to use POST... :D Can you split your page into multiple pages? For example, if the form is for collecting people's resume, you could ask them to provide their personal info on one page, then submit it using GET/POST as you like, process it, on to the next page, ask for their educational and other qualifications, submit again, next page, etc... Doing it this way will make it look more organized, and also take care of your little problem. Whenever you get stuck like this, it's time to take a step back and take another look at the design. :D 30 fields on a single page are a bit too much anyway, IMO. Think of the poor user. :) HTH. Regards, Rohit Sinha Browsy

        Do not wait for leaders; do it alone, person to person. - Mother Teresa

        1 Reply Last reply
        0
        • P Ph ntom

          Hi, I have an asp page called main.asp, This page contains some around 30 form elements. When I presses the submit button, I called a JAVASCRIPT method to collect and validate all of the values. After validation I need to pass all of the values to a page called submit.asp which is visible using an IFRAME in main.asp The idea of passing values along with the url and getting them using QueryString is good for small number of elements but for a large number of elements it is not feasible. I need to know how should I get all those form values on submit.asp without passing them with the url I chooses this strategy because I donot want to post my page to because it is a combination of more then 100 elements. Help kindly appreciated. :confused: Thanks. The Phantom.

          P Offline
          P Offline
          palbano
          wrote on last edited by
          #4

          >> because I donot want to post my page to because it is a combination >> of more then 100 elements. Sorry but that just does not make any sense. Use POST.

          "No matter where you go, there your are." - Buckaroo Banzai

          -pete

          1 Reply Last reply
          0
          • P Ph ntom

            Hi, I have an asp page called main.asp, This page contains some around 30 form elements. When I presses the submit button, I called a JAVASCRIPT method to collect and validate all of the values. After validation I need to pass all of the values to a page called submit.asp which is visible using an IFRAME in main.asp The idea of passing values along with the url and getting them using QueryString is good for small number of elements but for a large number of elements it is not feasible. I need to know how should I get all those form values on submit.asp without passing them with the url I chooses this strategy because I donot want to post my page to because it is a combination of more then 100 elements. Help kindly appreciated. :confused: Thanks. The Phantom.

            S Offline
            S Offline
            sivilian
            wrote on last edited by
            #5

            After you have validated your fields, you can submit the form using javascript: document.FORMNAME.Submit(); this will act exactly like a submit button. Make sure that on your Form tag you have an action attribute set to "submit.asp", and a method attribute set to "POST" In the submit.asp page you are able to access the values using Request.Form("NAMEOFCONTROL"). hope this helps, sivilian

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups