graham23s Posted January 20, 2008 Share Posted January 20, 2008 Hi GUys, i'm not to sure if this is a php question, but after the user clicks upload, i was wanting the upload button to fade/be disabled so it can't be clicked untill the upload is complete, what would be the best way to acomplish this? cheers Graham Quote Link to comment https://forums.phpfreaks.com/topic/86914-solved-disabling-the-upload-button/ Share on other sites More sharing options...
cooldude832 Posted January 20, 2008 Share Posted January 20, 2008 php can't do anything until all the uploaded data is sent to the server, meaning php can't do this you are probably talking about how paypal and ebay put that pushed down button. that is a js event when the submit is hit it makes that div and another div with an image of a "pressed" button swap places in the z-index (or some other derivation of this). Quote Link to comment https://forums.phpfreaks.com/topic/86914-solved-disabling-the-upload-button/#findComment-444354 Share on other sites More sharing options...
PHP Monkeh Posted January 20, 2008 Share Posted January 20, 2008 Something along the lines of: <input type="submit" onClick="javascript: this.disabled=true"> Haven't tested it but give it a shot! Quote Link to comment https://forums.phpfreaks.com/topic/86914-solved-disabling-the-upload-button/#findComment-444357 Share on other sites More sharing options...
phpretard Posted January 20, 2008 Share Posted January 20, 2008 I dont' know if you can use this but it works. <?php if(isset($_POST['submit'])) echo"<form><input type=submit disabled></form>"; else echo"<form method=post><input name=submit type=submit></form>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/86914-solved-disabling-the-upload-button/#findComment-444359 Share on other sites More sharing options...
graham23s Posted January 20, 2008 Author Share Posted January 20, 2008 Thank you guys solved it. Graham Quote Link to comment https://forums.phpfreaks.com/topic/86914-solved-disabling-the-upload-button/#findComment-444524 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.