|
|
Joined: Apr 2002
Posts: 102
Journeyman
|
Journeyman
Joined: Apr 2002
Posts: 102 |
I've seen other BB software where once you have clicked the submit button it is then disabled to cut down on double posts. Just thought this would be good for those who have slower boards combined with impatient people. []/forum/images/icons/rolleyes.gif[/]
|
|
|
|
Joined: Sep 1999
Posts: 339
Kahuna
|
Kahuna
Joined: Sep 1999
Posts: 339 |
The double posts won't get entered if they are using the submit button... the post has to be different, or else it will pick it up and not allow a second post.
Muhammad
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
I think the requested result is to keep them from sending information to the server a second time to keep the server load down. Although the duplicate post isn't entered it did use up some server time to figure that out. This is rough but this is what I think would be needed: Add this to the header insert include - <script language=javascript> var subonce = 1; function doSub () { if (subonce) { subonce = 0; document.replier.submit(); } else { alert('Please be patient... Thanks.'); return false; } } </script> Then replace your submit button type which should be labled "submit" with "button" and then add this to the same tag: onClick="doSub()" I think that should do it. I would have to actualy do it to see if it works though... lol I think it will []/forum/images/icons/wink.gif[/]
|
|
|
|
Joined: Sep 1999
Posts: 339
Kahuna
|
Kahuna
Joined: Sep 1999
Posts: 339 |
Have you tested that on netscape? I'm not sure if it will show up at all with "button" in there. []/forum/images/icons/smile.gif[/]
Muhammad
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
It should show up. I believe there are only 3 specific types of buttons. Submit, Reset and Button. The latter used when defining a specific function for it. []/forum/images/icons/smile.gif[/] I'll give it a whirl and make sure though. []/forum/images/icons/smile.gif[/]
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
Seems to be working for me... []/forum/images/icons/smile.gif[/]
|
|
|
|
Joined: Sep 1999
Posts: 339
Kahuna
|
Kahuna
Joined: Sep 1999
Posts: 339 |
Right... so long as it isn't "button" it should work... We have had problems with "button" in netscape.
Muhammad
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
I have never had a problem using "button" with NS 4.7+ but perhaps older versions had the problem?
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
your code looks good dave, we've had several versions of that for ubb, I'll hunt it down later []/forum/images/icons/smile.gif[/]
|
|
|
|
Joined: Sep 1999
Posts: 339
Kahuna
|
Kahuna
Joined: Sep 1999
Posts: 339 |
4.7, 6.0, both had problems. []/forum/images/icons/smile.gif[/] We changed it to submit and it worked...
Muhammad
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
Thanks []/forum/images/icons/smile.gif[/] I should add that the javascript is ment for 6.0 because the form tag has been given a name "replier" otherwise all affected scripts would need to be edited and name="replier" added to the form tags. []/forum/images/icons/smile.gif[/]
|
|
|
|
Joined: Apr 2002
Posts: 102
Journeyman
|
Journeyman
Joined: Apr 2002
Posts: 102 |
|
|
|
|
Joined: Oct 1999
Posts: 282
Enthusiast
|
Enthusiast
Joined: Oct 1999
Posts: 282 |
Good idea. But why not remove the button or make it invisible instead of the alert-box? Just a thought...
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
The button can't be removed till after the page is generated again so to keep a person from hitting the button more than once while the page is trying to post causes the same information to be sent twice. Using the javascript to check before sending keeps this from happening. []/forum/images/icons/smile.gif[/] You could remove the alert box and just return the false statement. Nothing more will happen and the information will still only be submitted once. I just figured it would give the impatient people more incentive to wait... lol []/forum/images/icons/wink.gif[/]
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 254
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|