icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » Disabling form button upon submission

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old August 28th, 2004, 10:51 AM   #1 (permalink)
I own you!
Excelling Contributor
 
Joined in Apr 2004
563 posts
Gave thanks: 0
Thanked 3 times
Disabling form button upon submission

Well I want to disable the form button once a user submits the form.

So basically I have this

Code:
<input name="gfdfg" type="button" class="button" value="gfd">
As soon as the user presses the button, I want to show this instead:

Code:
<input name="submit" type="button" disabled="true" class="button" value="Submit">
do you guyz know how to do this? I think it's a simple if statement. But Im not sure how.

Thanks
AJPayne is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 28th, 2004, 11:06 AM   #2 (permalink)
Hostering?
Excelling Contributor
 
mobius's Avatar
 
Joined in Jan 2004
Lives in New York
Hosted on D41
970 posts
Gave thanks: 0
Thanked 0 times
http://www.ozzu.com/ftopic28866.html

EDIT: google is your friend
__________________
{_DIME.41 Reseller_}

Stay cool.

>> Avatar used with permission from garyzullo.com <<
mobius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 28th, 2004, 11:37 AM   #3 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
AJ -

what you want is javascript. Alternately you can take the user to a "thank you" page as the form action, and in that "thankyou page" - it's all php - process his data.
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 28th, 2004, 1:37 PM   #4 (permalink)
Peaches!
Excelling Contributor
 
Joined in Jul 2003
Lives in Ottawa, Ontario, Canada
Hosted on Jose, Pass19
564 posts
Gave thanks: 0
Thanked 0 times
Here's the way I do it. In your <form> tag, put this at the end:
onsubmit="this.nameofyoursubmitbutton.disabled=tru e;"
__________________
alex.honeywell [ seigousei.net - pass19, binuweb.com - jose ]
AlexH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 29th, 2004, 4:37 AM   #5 (permalink)
I own you!
Excelling Contributor
 
Joined in Apr 2004
563 posts
Gave thanks: 0
Thanked 3 times
Yup that did it Alex,

Thanks a bunch
AJPayne is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On