English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i need to refresh DIV contents that are preloaded using AJAX without refreshing the index page. after the DIV contents are loaded, when i try to refresh, index page goes back to original contents. i would like it to work the same way frames would work. help plz!

2006-07-01 14:41:24 · 2 answers · asked by wamisely 1 in Computers & Internet Programming & Design

2 answers

You have to use the {divName}.innerHTML property of the div.

just have Ajax get the information, and do a document.getElementById ('divName') .innerHTML=contents;

You can also append to the div by doing a concat with +=

EDIT (code snip):









Change It!

2006-07-01 15:31:48 · answer #1 · answered by John J 6 · 0 0

changing photograph is easy: on your HTML physique onLoad experience run the script which will set the src characteristic of your photograph to random photograph. in case you load all text fabric mixtures on your div into JavaScript vars you could exchange the fee/text fabric of your div contained in comparable to above and/or timed script.

2016-11-01 01:47:42 · answer #2 · answered by rangnow 4 · 0 0

fedest.com, questions and answers