Dropdown Menus: Is Ajax commonly used for this?

Is it common to use Ajax to render certain HTML elements? I know that you can use it for status reporting, success, warning, and error. However, I am more curious about dropdown menus, for example: on sites like, Google+, Quora, and Facebook, a dropdown menu isn’t pre-loaded on the page, instead when you click an icon that represents “additional options”, a menu appears.

Following this with Firebug, one can see that it is appended to the DOM, and positions are calculated i.e.

var element = something.css(“left” : 899, “top” : 88); 
$(body).append(element); 

I am curious if Ajax is used here, I am unable to see any HTML in the response, might be because it is JSON encoded.

Edit: I am wondering about this, see the dropdown menu on the screenshot.

enter image description here

That dropdown menu isn’t there from the beginning, instead, it is appended when I click on the icon. I am still curious if this is done via Ajax, and if YES, wouldn’t this have an impact on the Web Server?

enter image description here


Source: ajax

Leave a Reply