.
Developer Spot - Web Development Tutorials
arrowDeverloper Spot  Tutorials  JAVASCRIPT  Changing Form Action URLs On-The-Fly  
 
Development Tutorials
ASP
CGI & Perl
CSS
HTML
Java
JavaScript
Linux
PHP
XML




More Resources
Web Hosting Articles
Web Development News
PHP Manual
Web Hosting Directory
Budget Web Hosting Linux Web Hosting Small Business Hosting
Windows Web Hosting Reseller Web Hosting Web Hosting Articles

Changing Form Action URLs On-The-Fly

By Will Bontrager
2003-09-03
Reader Rating: 3 out of 5
Bookmark Print Version
Mention #1

The form must have a name. Also, the action="_____" should have a URL. Example:

<form name="myform" action="/cgi-bin/mf.cgi" method="post">

The name is so the JavaScript can modify the other attributes.

The action is the default URL. This is where the form will be submitted to if the user does not click a radio button or if the user's browser is not JavaScript-enabled. If there is no default URL, and no other URL is provided, then the browser will submit to the current page.

The method should be whatever the script/page at the default action="_____" URL expects.


Article Pages:
Introduction
Mention #1
Mention #2, 3 & 4
Method #5
Mention #6
The Complete Example

Copyright 2004 Bontrager Connection, LLC


 Rate this article:   Poor          Excellent 


If you found this article interesting, you may want to read these as well:



 
Development Tutorials: CGI & Perl - CSS - HTML - Java - JavaScript - Linux - PHP - XML
More Resources: Web Hosting Articles - Web Development News - PHP Manual