MIDRANGE dot COM Mailing List Archive



Home » WEB400 » January 2002

limiting multiple clicks on cgi links



fixed

Hey all,

I'd like to start a discussion on techniques to limit users doing multiple
clicks on a CGI link from browser apps.

I currently use a technique where I set on a JS variable on the first
click, and only execute the function if the variable is off.  for example:
a link calls JS function listpage()  listpage looks like this:

<script language=JavaScript>
var submitted = false;

function listPage() {
if (!submitted) {
submitted = true;
document.m01.action="/cgi-bin/wwlstpag";
document.m01.submit(); }
}
</script>

This works well enough most of the time.

Sometimes though, rarely, but enought to frustrate, and I'm not sure why,
the page becomes "dead" because submitted has been set to true, but the cgi
has lost track of the browser.  I think it might come from hitting the stop
button, or some other anomaly.

When this happens, a simple "Shift/Refresh" restores the form and links can
be pressed again.  but this is hardly intuitive, and since i'm working on
an app that will be used by non-computer literate restaurant employees,
could cause a lot of calls to support.

how do all of you in the group handle multiple clicks on cgi links?

Thanks in advance,

Rick







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact