dezkit Posted September 27, 2008 Share Posted September 27, 2008 Is it possible so that when somebody presses "Upload", the "Upload" button disapears and then instead of "Upload" it shows a text saying "Loading..." Thanks <table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form action="upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td><strong>Single File Upload </strong></td> </tr> <tr> <td>Select file <input name="ufile" type="file" id="ufile" size="50" /></td> </tr> <tr> <td align="center"><input type="submit" name="Submit" value="Upload" /></td> </tr> </table> </td> </form> </tr> </table> Quote Link to comment Share on other sites More sharing options...
dezkit Posted September 27, 2008 Author Share Posted September 27, 2008 i found this <script> function submitonce(theform){ if (document.all||document.getElementById){ for (i=0;i<theform.length;i++){ var tempobj=theform.elements[i] if(tempobj.type.toLowerCase()=="submit") tempobj.disabled=true } } } </script> But can anybody tell me how to change the text of the button, not just to disable it? Quote Link to comment Share on other sites More sharing options...
CroNiX Posted September 27, 2008 Share Posted September 27, 2008 Right under tempobj.disabled=true add tempobj.value='Loading...'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.