473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Can javascript do something at submit() time to dstract the user?

Can javascript do something at submit() time to distract the user?...
like clear the form... or clear the screen ??

I have seen some fancy ways to prevent multiple clicks..... but a
number of my cgi's eat up several seconds before they can respond and I
would like to keep my user out of trouble;O)))

Whatever it is. it has to be non-modal and not involve nph headers (my
webserver does not support them).

Are there any choices?

TIA
Chuck

Jul 23 '05 #1
2 1506
VK
you may try
<input type="submit" value="Submit"
onclick="event.cancelBubble=true;return false;"
onmouseup="if(this.isAlreadyClicked){doDistraction ();}
else{this.isAlreadyClicked=true;this.form.submit() ;}">

Still all scriptable "blockers" are not very reliable if you have your
script and your form on the same page. Form submission means that the
current page doesn't exists anymore. I know you still see it, but
officially nothing is here anymore: no button, no script. It may behave
(or may not) untill the form responce arrival because some code is
still retained in the program cash (orphaned scripts). You better
update your CGI's: send first HTTP header to clear up browser window,
then do your stuff with no rush and send the responce data.

Jul 23 '05 #2
Attach an onSubmit event to the form like so:
<form onsubmit="return myFunction()">

then do what ever you want at myFuction()

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gowhera Hussain | last post by:
Use This for Learning Only .... Do Not Try To Act Smart HACKING WITH JAVASCRIPT Dr_aMado Sun, 11 Apr 2004 16:40:13 UTC This tutorial is an overview of how javascript can be used to bypass...
3
by: fig000 | last post by:
Hi, I'm relatively new to Javascript so please bear with me on what might sound like silly questions. This is what I want to do: I'm working in classic asp (I have to for this project). I...
2
by: Andy Fish | last post by:
Hi, I am in the process of designing a UI which has to be fairly sophisticated. There will be a number of list boxes and other controls, with pop-up windows to edit certain properties. It's the...
8
by: Prometheus Research | last post by:
http://newyork.craigslist.org/eng/34043771.html We need a JavaScript component which will auto-submit a form after a set period has elapsed. The component must display a counter that dynamically...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.