Feeds:
Posts
Comments

Posts Tagged ‘javascript’

jQuery offers two powerful methods to execute code and attach event handlers: $(document).ready and $(window).load. The document ready event executes already when the HTML-Document is loaded and the DOM is ready, even if all the graphics haven’t loaded yet. If you want to hook up your events for certain elements before the window loads, then [...]

Read Full Post »

The Firebug plugin for Firefox is indispensable to debug and examine HTML pages. The Firebug Console executes jQuery expressions, too. It shows directly the effects of all Javascript and jQuery functions. The effects are immediately visible on the page, but the results it returns on the console are often less useful, because one can not [...]

Read Full Post »

Let us consider the following context: you have a dropdown selection box, and want do load specific content dynamically via Ajax for each entry of the box.

<select id=’box_id’>
<option value=’1′>One</option>
<option value=’2′>Two</option>
<option value=’3′>Three</option>
</select>

The following jQuery Ajax call looks ok and works in FireFox, but it doesn’t work for the Internet Explorer. [...]

Read Full Post »

Ajax with jQuery

Loading stuff through Ajax-requests is simple with jQuery. The following code loads a remote page using an asnychronous XML HTTP request and replaces the content of the HTML tag with the ID “panel”:

jQuery("#panel").load("/items/"+id);

If you want to add more options, you can use the following notation:

jQuery.ajax({
[...]

Read Full Post »