Passing multiple values
-
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.
-
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.
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.
-
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.
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
-
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.
-
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.
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