[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

ACTION attribute

Posted on 1999-11-10
2
Medium Priority
?
170 Views
Last Modified: 2010-04-09
Is it possible to have one of two CGI scripts called when I click on the Submit button on my form based on values entered in one of the text boxes without having to modify either script?
0
Comment
Question by:wariar
2 Comments
 
LVL 33

Accepted Solution

by:
knightEknight earned 400 total points
ID: 2197756
Yes, do this:

<SCRIPT language='javascript'>
function mysubmit(theform)
{
   if ( theform.thetextbox.value == "T" )
   {
        theform.action = 'cgi1.cgi';
   }
   else
   {
        theform.action = 'cgi2.cgi';
   }
   return(true);
}
</script>

<BODY>

<FORM name='myform' action='doesnotmatter' method='post' onSubmit='return(mysubmit(this));'>
0
 

Author Comment

by:wariar
ID: 2197808
Thanks a lot! That solves a lot of problems!!
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

591 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