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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why isn't my Submit button processing all fields?

Forms

Why isn't my Submit button processing all fields?

by  webmigit  Posted    (Edited  )
I had some trouble with forms for two days and finally asked someone on Microsoft Newgroups.. My submit button wasn't processing the value of itself when it submitted and this was his answer:

IE6 (on windows XP at least) has a glitch where if there's only one input field on the form pressing enter will submit the form but not the value of the submit button...

The hidden field will handle it... The button does process the value of the field..

This tag is my donation to the fix... Put it in your custom tags folder...

----Contents of fInput.cfm---
<CFPARAM name="attributes.bname" default="Action"
<CFPARAM name="attributes.bvalue" default="Login">

<CFOUTPUT>
<INPUT type="hidden" value="#Attributes.bValue#" name="#Attributes.bName#">
<INPUT type="submit" value="#Attributes.bValue#">
</CFOUTPUT>

For those of you who have not worked with custom tags.. the syntax is:

<CF_finput bname="ButtonName" bvalue="Button Value">

All I ask is that you let me know if this helps you..

Happy Coding!
Tony
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top