Topic: help regarding to communication

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

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

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

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

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

   clientArea.innerHTML = clientArea.innerHTML + "\n" + '<textarea></textarea>';
   winList[name] = new Window(newIM);

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.

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...


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