Jump to content

Recommended Posts

Hello,

 

My current login button consists of:

 

<form method="post" action="">
<input type="password" name="pswd">
<input type="submit" onclick="this.disabled=true;return true;" name="login" value="Login">

 

Basicly, I want to achieve the following:

 

1: Submit in 5 seconds when clicked, not instantly.

2: Change the text on the button when clicked ie: Please wait..

3: Disable button once clicked, like I have already done.

 

Is this possible to fit into one?

 

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/220669-javascript-help-with-html-button/
Share on other sites

You need to make a function that will be called when the button is clicked, for the 5 seconds you need to be waited, you can check here http://www.sean.co.uk/a/webdesign/javascriptdelay.shtm, for the button name, you can change it using the .value property and for disabling the button you can check here http://www.codetoad.com/javascript/enable_disable_form_element.asp, I recommend you to read about javascript.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.