ralph,

This is an existing application that I don't want to spend a lot of time rewriting, 
but you did give me an idea. On error, I'll just loop over the values passed, set a 
bunch of hidden form fields, then submit back to the original form. On the original 
form, I'll test if the user has been sent back, and if so, then set the to: 
document.frmTerminal.Proceed.disabled=false;

Thanks, Stan

>Well, there are a whole bunch of ways to do this.
>
>1) Why should user have to "go back"? Page should submit to itself; if 
>error, display message, but the flag (however set) should indicate 
>that the form HAS been submitted.
>
>2) OK, have to go back a page for whatever reason: Possible solution 
>-
 
>Set a URL param that indicates this: "index.cfm?submitted=yes"; set 
>the button to enabled if the param exists, either via JS or ColdFusion.
>
>
>Make sense?
>
>The easiest way is to submit the form back to the same page; that way 
>all values are kept (including, perhaps, the ones that are formatted 
>by CF to read correctly. For example, echo back the error and have the 
>user name trimmed appropriately - not "   ralph" but "ralph"
>
>
>>I've got a form with a submit button that is disabled when the page 
>is
>>loaded. The following snippet is at the very bottom of the page:
>>
>><script language="JavaScript">
>><!--
>>  document.frmTerminal.Proceed.disabled=true;
>>//-->
>></script>
>>
>>When the user makes a selection from a radio group the button is 
>enabled.
>>
>>The problem is if there are any user input errors after the server 
>side
>>validation, and the user is prompted to go back, the button is 
>disabled
>>again. This is the go back button:
>><input type=button value="<-- Please Go Back" onClick="history.
>go(-1)">
>>
>>I cannot remember how to keep the button enabled if the user has to 
>go back.
>>
>>Thanks,
>>Stan Winchester
>>
>>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com

Reply via email to