[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


ASP form

Posted on 2006-04-21
Medium Priority
Last Modified: 2010-04-06
I have a form with three fields (2 pulldowns, and 1 checkboxes) if a certain criteria is met
I would like to introduce another field. Do I do this at the submit?

ie. If Field A = 123 and Field B = XYZ then post to newpage.asp


post to emailformpage.asp
Question by:tmurray22
1 Comment

Accepted Solution

smaccari earned 2000 total points
ID: 16511177
Like this: (use a JS function that will change the action of your form in a certain condition upon submit)

<form action=emailformpage.asp onsubmit="return checkValues(this)">
<input type=text name=fieldA>
<input type=text name=fieldB>
<input type=submit>

function checkValues(frm)
if ((frm.elements["fieldA"].value=="123")&&(frm.elements["fieldB"].value=="XYZ")) frm.action="newpage.asp";
return true;

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question