1 ) Find this function in step 1 from the demo page (only the top part is shown as, that is all we will need to change):
Code:
function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try { . . .
You can add in some code to display a .gif that portrays loading by adding this code:
Code:
function ajaxpage(url, containerid){
document.getElementById(containerid).innerHTML='<table width="100%" height="400"><tr><td valign="middle" align="center"><img src="loading.gif"></td></tr></table>'
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try { . . .
You could use an image like so:

I'm not really sure what you mean by:
2) how can I add any effects , for loading pages In this scripts .
On the demo page, it discusses the use of the loadobjs() function. For more advanced effects that require the added content to be initialized, see:
http://www.dynamicdrive.com/forums/s...ad.php?t=13003
Bookmarks