For years I’ve seen the calls to ‘return false’ following an onclick event, but I never realized what it was used for. Once I began using Ajax, I quckly learned why using ‘return false’ was so important. Because Ajax processes a request without refreshing the browser, I was able to see the inherint functionality of the browser when a button is clicked. The browser appears to jump to the top of the page. Adding ‘reutrn false’ after the onclick event will ensure that the browser page does not ‘jump’. Try it out.
Archive for the ‘Javascript’ Category
After many years of creating Flash-enabled websites (and writing a lot of ActionScript), I decided to explore the use of Ajax. I had grown so accustom to developing websites where page refreshes weren’t required that I rarely created websites using HTML only. From everything that I read prior creating website using Ajax, I thought that it had the promise to replace Flash. My primary reason for exploring the use of Ajax to create websites was because, as I learned more about marketing a website (and how most search engines don’t/can’t index Flash-only sites), I decided that it was better to appear in a search engine’s listing than to have cool navigation (and animation!).


