The problem of loading new content into a page area?

CoreCellar

New Member
How would you go about loading the content of menu items(basically new pages) into the empty area below the menu?

So that the initial page and the menu itself is not loaded anew, but just the content linked from the menu items is loaded.
 

CoreCellar

New Member
Yes, I already knew about that, but how do you change the content in a part of the page(below the menu), instead of the whole page?
 

chrishirst

Well-Known Member
Staff member
You read the response data from the HTTP server request object and insert it into the HTML attribute of the content holder element

If you had read down the page I linked to, you should have found a header labelled Function LoadDoc() which is the entire operation of retrieving and displaying the data.

You simply need to replace "ajax_info.txt" with the URL of the document you want to display and change "demo" to the ID of YOUR content holder element.
 

chrishirst

Well-Known Member
Staff member
menu items would have to be transformed into buttons?
No, just use the 'onClick()' event handler of the link to trigger the request.

Make sure the event is also set to return false so the anchor href attribute does not get called by the 'click' event.
 

website7

New Member
No, just use the 'onClick()' event handler of the link to trigger the request.

Make sure the event is also set to return false so the anchor href attribute does not get called by the 'click' event.
Hi chrishirst, who are you??? because in that forum whar ever questions you are the answer that place , how you get the knowledge about all ???
 

Joniantrey

New Member
As AJAX gives capability to load specific components like populating any field, fetching data from back end systems based on any event, it has been used to alleviate the load on network and allows faster web browsing as loading any specific items is less network intensive task rather loading an entire web page.
 
Top