Topic: help regarding to communication

hi,
    i want your help .
in my script when user click on link than a separate division is creating my java script function is :
[code=Javacript]
function createIMWindow( name, title ) {

   var newIM = document.createElement('div');
   newIM.style.display = 'block';
   newIM.id = name+"_im";
   newIM.className = 'window';
   newIM.style.width= '500px';

   var titlebar = document.createElement('div');
   newIM.appendChild(titlebar);
   titlebar.innerHTML = '<div><img src="'+ testvar +'"></div><div><span id="'+name+'_titleBar">'+title+'</span></div><div>default text</div>';

   var clientArea = document.createElement('div');
   newIM.appendChild(clientArea);
   clientArea.setAttribute("style", "height:500px;text-align:center;");

   var a = document.createElement('div');
   clientArea.appendChild(a);
   a.id = name+"_rcvd";

     
   clientArea.innerHTML = clientArea.innerHTML + "\n" + '<textarea></textarea>';
   document.body.insertBefore(newIM,document.body.nextSibling);
   winList[name] = new Window(newIM);
}
[/code]   

in this script variable "testvar" is change in every 4 second in parent window by which this separate div has created.
how will i get the updated value of "testvar" variable in this seperate div.

thanx
i am waiting for your favour

Re: help regarding to communication

You might try a JS function with a timer that goes off every 4 seconds and calls your registered XAJAX function to update the img tag. The img would need an id attribute and the PHP function would assign its src attribute.

You can make it the onload event of the page to get it going the first time...

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: help regarding to communication

hey can we call more than one function from single event in javascript if yes than how plz tell me