Page 1 of 1

How Did They Do That?

Posted: Thu Mar 02, 2006 1:25 am
by icesolid
Go to this page here and click on the LOG IN page at the top and then click the SUBMIT button, when you click the button the value changes to Please wait... and there is a pause and then the server script is run, I think ASP is run, anyways...

How did they do that!?!!?

Posted: Thu Mar 02, 2006 11:47 am
by feyd
you can access the "value" of the button and change it, then maybe a setTimeout() or just straight request..

Posted: Thu Mar 02, 2006 12:15 pm
by Roja

Code: Select all

<input type="submit" onclick="javascript:disableAndSubmit(this);" onkeypress="javascript:disableAndSubmit(this);" name="SUBMIT" value="SUBMIT" accesskey="S">
Thats from view source on the page. They use javascript to change the button to disabled, and still submit it.

Posted: Thu Mar 02, 2006 1:11 pm
by nickman013
This is just from the source.

The JavaScript

Code: Select all

<script language="Javascript" type="text/javascript">function disableAndSubmit(theButton)
{
 theButton.value="Please Wait...";
 theButton.disabled = true;
 theButton.className = "buttonPress";
 theButton.form.submit();
}
</script>
The Submit Button

Code: Select all

<input type="submit" onclick="javascript:disableAndSubmit(this);" onkeypress="javascript:disableAndSubmit(this);" name="SUBMIT" value="SUBMIT" accesskey="S">