O'Reilly logo

Joomla! 1.5 JavaScript jQuery by Jose Argudo Blanco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Possible problems and solutions with jQuery

When working with JavaScript, we can have more problems than not having JavaScript available; for example, the called URL not being available, a timeout, or something similar.

That can be quite inconvenient for our visitors, especially if they don't know that something bad has happened. Taking our mod_littlecontact as an example again, this module uses the following script to make the AJAX call:

$.post("index.php", $("#sc_form").serialize(), show_ok());
        

Instead of writing this URL, misspell it as follows:

$.post("inde.php", $("#sc_form").serialize(), show_ok());
        

Well, you can give it a try, but I would like to tell you that no errors will occur. All will work as expected, except that the mail will not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required