Topic: communiccation teo between ifrmae

hi,
    In my application i am having 2 iframe frame1 and frame2. And each one have a javascript file, frame1 have ifarme1.js and frame2 have iframe2.js frame1 is calling a function A() of iframe2.js and function A() have a for loop and in this loop it is calling another function of B().
the function B is as follows :



[code=Javacript]

function B( usernamelist ) {

   user_id_list = (usernamelist.getAttribute('id'));
   user_name_list = (usernamelist.firstChild.data);
   var buddyList = parent.testFrame1.document.getElementById('buddylist');
   buddyList.innerHTML = buddyList.innerHTML + '<span id="'+user_id_list+'_blItem" class="view"    onselectstart="return false;" onclick="'+" if(curSelectedc>0){var  old=document.getElementById(curSelected+'_blItem');old.style.background='#fff';old.style.color='#333';};this.style.background='#47649a';this.style.color='#fff';curSelected='"+user_id_list+"';curuserName='"+user_name_list+"';"+'" ondblclick="if(curSelected.length>0){if(!document.getElementById(curSelected+\'_im\')){createIMWindow(curSelected, curuserName);imgping(curSelected);winList[curSelected].open();document.getElementById(curSelected+\'_sendBox\').focus();};};return false;"><img src="images/online.png" width="5" height="5" alt="" id="'+user_id_list+'_blImg" />