Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

method = "get" form submission 1

Status
Not open for further replies.

ice78991

Programmer
Nov 20, 2006
216
<form action="example.cfm" method="get">
<input type="text" name="input1" value="">
<input type="text" name="input2" value="">
<input type="hidden" name="hidden" value="">
<cfinput type="submit" name="sub" value="Submit">
</form>

If you submit empty fields in the above form then they are included in the URL as follows
input1=&input2=&hidden=

Is there any way to force the browser to only add variables to the URL if they have a value?
 
You'd have to use javascript to perform any checks and remove the elements which don't have a value. Try asking in the javascript forum if you have any problems implementing the code.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top