PDA

View Full Version : Assistance required please.



radiocodes
01-28-2007, 11:40 AM
Hello and thank you in advance if you are able to help me.

I am looking for a javascript that does the following:

User fills out form, they press submit, the submit button words change to 'please wait' and disables, after a delay forward to a page,

I hope this makes sense.................... this is urgent.

djr33
01-29-2007, 02:13 AM
...why?

What possible reason is there to add a delay to submitting a form?

Anyway, I expect you could do this fairly easily with a timer and the onSubmit attribute.

Perhaps on the submit button, use:
onClick="this.value='pleasewait';"

And for the onSubmit just do a timer for 5 seconds or whatever.

Plus the disable submit code... not sure what that is, but there are plenty of scripts to use as an example around.

tech_support
01-29-2007, 04:17 AM
<form .............. onSumit="this.elements['Submit'].value='Please wait...';this.elements['Submit'].disabled = true">

Untested.

Basically, add
onSumit="this.elements['Submit'].value='Please wait...';this.elements['Submit'].disabled = true" to your form tag.