Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Easy Date   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 07-03-2006, 09:13 AM   #1 (permalink)
Inactive
 
Join Date: 10-13-03
Location: Finland
Posts: 640
iTrader: 0 / 0%
Latest Blog:
None

Cibok is just really niceCibok is just really niceCibok is just really niceCibok is just really niceCibok is just really niceCibok is just really niceCibok is just really niceCibok is just really niceCibok is just really niceCibok is just really nice
Send a message via ICQ to Cibok Send a message via AIM to Cibok Send a message via MSN to Cibok Send a message via Yahoo to Cibok
Disabling Double-Submitting On Forms

Hi,

I have several forms all over my website. Currently when I double-click the submit button, the form gets sent out twice. I'd like to prevent this from happening. I guess I need some sort of javascript for this, but I have no knowledge of javascript!

I tried a few premade ones, but they didn't work on all browsers (and some didn't work at all). So if you have something that I could just put on my site's header.php file that would solve the problem, then that would be perfect!

I can also just ofcourse edit all the forms myself, but that would take some more time.

Thanks!
Cibok is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 07-06-2006, 01:35 AM   #2 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
As this is a code question why not try the coding forum?
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-06-2006, 02:16 AM   #3 (permalink)
Contributing Member
 
helloworld's Avatar
 
Join Date: 06-29-06
Posts: 72
iTrader: 0 / 0%
Latest Blog:
None

helloworld is liked by somebodyhelloworld is liked by somebodyhelloworld is liked by somebodyhelloworld is liked by somebodyhelloworld is liked by somebody
The best solution is to place the forms on a seperate page from the scripts.

Alot of scripts use: action=\"$PHP_SELF\", or for html: action="<?PHP_SELF?>"

Instead it's wise to use: action=\"location-to-scipt\" or
for html: action="location-to-scipt"


----------------------------------------------------------------------------------------
could use java



<script language:"javaScript">
function hideMybutton(){
var myForm = document.formName;
myForm.mySubmitbutton.style.visibility="hidden";
alert("The Form has been sent please wait");
}
</script>

add this: onClick="hideMybutton();" name="mySubmitbutton" to your button


ie:
<input type="button" value=" submit " onClick="hideMybutton();" name="mySubmitbutton">

Last edited by helloworld : 07-06-2006 at 02:34 AM.
helloworld is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
submitting to directory / same IP juststones SEO Forum 6 05-24-2007 04:27 PM
Google Disabling Adsense June 1st peter_d Google Forum 10 05-21-2007 01:08 PM
Google: Disabling the Politically Incorrect Ferre Google Forum 4 02-21-2007 08:50 AM
Submitting sanjaymoodley V7N Directory Issues 1 07-12-2005 06:33 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 11:27 AM.
© Copyright 2008 V7 Inc