Forums

Can the submit button do more...

Ron 20 Mar, 2012
Hello,

I am using this submit button on the form:
<input value="Submit " class="submitbtn" name="submit" type="submit" id="submit" onclick="this.disabled=false;this.value='Trying to Send, please wait...';this.form.submit();"/>

When a user presses "Submit" it changes to "Trying to Send, please wait..." It works okay but I have a problem.🤨

When the form tries to validate an alert pops up but the "Submit" button has changed. Is it possible that when the form is not getting submitted the display changes back to "Submit". I do not want to use JavaScript.

Could someone make suggestions please.

Thanks

Ron
GreyHead 21 Mar, 2012
Hi Ron,

I do not want to use JavaScript.

Eh? this makes no sense to me.

You can try changing your JavaScript to use onSubmit instead of onClick.

Bob
Ron 21 Mar, 2012
Thanks for the reply Bob,

I did not want to use java script as I have so much java script that they are conflicting with each other so I was looking for a php alternative.

Thanks for your help

Ron

Note: I have edited this post as my question was not relative to this post. I will open another topic for it.
GreyHead 22 Mar, 2012
Hi Ron,

No I don't think you can, the form only submits name=value data so the ID isn't available and the name doesn't mean much. What are you trying to do here?
Ron 22 Mar, 2012
Thanks for the answer bob,

I have edited my earlier post as it was not relevant to this topic. Sorry for that. I will open another topic for it later as it is not very urgent. But the Submit button is.

Thanks again

Ron
GreyHead 22 Mar, 2012
Hi Ron,

I don't see any way of doing what you want here without JavaScript - anything else requires the form to be submitted.

Bob
Ron 22 Mar, 2012
Thanks Bob

I will do some more research on my requirement and get back once I have something.

Bye for now

Ron
This topic is locked and no more replies can be posted.