Technology : General Technology Notes: Diary of a late,late adopter.
Updated: 4/4/2004; 7:43:40 AM.

 

Frequent Visits

Subscribe to "Technology" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Monday, March 15, 2004

JavaScript Disable Links

Here is the javascript function I used to disable the link that people often click more than once:

 function disable_links(){ 

// this function disables all the links on the page 

  for(var i=0; i < document.links.length;i++)

  {

      document.links[i].onclick=function () { return false; }

      document.links[i].title = "The exam has been submitted. Please wait for results page";

  }

  return true;

}


12:52:50 PM    comment []

For two weeks I had this really frustrating problem:

When users submitted the online fisheries exam, sometimes they would get an error page while the results would be emailed with no problems. I kept testing it and never got the error. I wondered if the database was crapping out because of too many open connections, I wondered about browsers caching error pages.

Then I watched someone submit the exam. They were like, "it sometimes takes several clicks before it submits"..... click click click. It is second nature to me not to submit a form more than once, no matter how long it takes the server to process the form.

 So, when testing, click all the buttons more than once, because it's a sure bet your users will.

In any case, there should be some code that handles this problem, but I didn't write the thing, I just inherited it.


9:39:39 AM    comment []

Roger's Cadenhead, the author of the excellent Radio Userland Kickstart, has released the first version of his workbench.root

It has two scripts:

  • Workbench.viewCategories(), a script to display category links on your home page template and other pages.
  • Workbench.viewPostIndex(), a script to display links to your posts in reverse chronological order

  • 8:16:13 AM    comment []

    © Copyright 2004 mcgyver5.



    Click here to visit the Radio UserLand website.

     


    March 2004
    Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4 5 6
    7 8 9 10 11 12 13
    14 15 16 17 18 19 20
    21 22 23 24 25 26 27
    28 29 30 31      
    Feb   Apr