> submitted? I assume javascript provides some means of doing this?textfield.value = "" You will likely want to create your own javascript method to handle your event that goes something like: myEvent = function() { textfield = document.getElementById(''textfield'') result = // result of remote action if (result) { textfield.value = "" } else { alert(''something horrible has happened'') } }
After submitting a remote form a text field that is submitted still contains the user input. To avoid confusion I would like to clear out this box so that the user understands that their information has been submitted. What would be the best way to clear out the text field after it is submitted? I assume javascript provides some means of doing this? Thank you, Matt Margolis
Craig Davey wrote:>>submitted? I assume javascript provides some means of doing this? >> >> > >textfield.value = "" > >You will likely want to create your own javascript method to handle >your event that goes something like: > >myEvent = function() { > textfield = document.getElementById(''textfield'') > result = // result of remote action > if (result) { > textfield.value = "" > } > else { > alert(''something horrible has happened'') > } > } >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >Great. Thank you. Matt Margolis