How Did They Do That?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

How Did They Do That?

Post 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!?!!?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you can access the "value" of the button and change it, then maybe a setTimeout() or just straight request..
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post 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.
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post 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">
Post Reply