Another great “little” solution with jQuery. Needed a simple way to protect all the forms on our site from being double submitted. There was an attempted solution in place on our app, that added an onsubmit to every form with a function above it called ignoreDoubleSubmit that tried to trap the event of the button was clicked and not allow it to be clicked again. The problem was the event for the button wasn’t present when the form was submitted so it would silently error out with a blink in the Firebug console.
Continue reading

We started the process of getting rid of deprecated methods in order to migrate to jQuery 1.9, but the removal of $.browser was a no go for us. I pulled jQuery’s browser detection code and packaged it into a closure, with a few minor changes for past encountered bugs, and then simply replaced all instances of “$.browser” in my scripts with “browser”. Add this script above the rest of your scrips and make the replace and you’ll have your browser detection back.
Continue reading

For some reason today, boredom or whatever, I was hell bent on getting the Angry Birds theme song onto my iPhone to replace that stupid Marimba ringtone. First task was to find or make the ringtone, I found one offered up for free here http://www.angrybirdsnest.com/2010/08/angry-birds-theme-song-ringtone/. Not quite sure yet how I was going to manage getting the ringtone on to my phone, I copied the link for the theme song from the web page, http://www.
Continue reading

In your html template or page add a nojs class to your html node and a script tag in the head section below your title changing the className to js: In this very simple example all of your non-javascript users would see links with a class of myclass as red and all javascript enabled users would see the links with the color black. Both javascript and non-javascript users would see the links with the class myclass2 as blue.
Continue reading

The tabindex is absolutely necessary for controlling the tab order through a really long form, from a usability and accessibility standpoint. This is probably not the preferred way to do this, you should be setting the tabindex attribute on all of your input elements in your html. Now if you work with lazy developers, that often forget to set the tabindex, you may find this to be an acceptable solution.
Continue reading

I was recently in need of a stock quote web service in order to display quote information and charts for a corporate website I was working on, so I started looking around for something, free of course. I kept reading that the most common example of web as a service is the stock quote example, but I didn’t really find any examples that gave me a warm and fuzzy, everyone seemed to be scraping the html from a page.
Continue reading

Form input focus always seems a pain to me, I don’t like all of the generated inline javascript that struts or other frameworks add to accomplish this and it always seems to be one issue or another. So here’s a simple solution that applies focus to the last input element in the document that has a class of focus. Short and sweet, nothing fancy, requires the jQuery library of course.
Continue reading

Author's picture

GreatWebGuy

Code jockey, cloud native enthusiast, technologist, car nut

Developer

West Palm Beach, FL