Jump to content

help with iframe please....


meomike2000

Recommended Posts

in my script i create an iframe , then the script uses user input to fill a div tag inside the body tag of the iframe src page. this works fine on my ubuntu machine using firefox browser, but will not work on my windows machine using ie,

 

can somebody please show me or point me to some info on how to make this work for the ie browser.....

 

this is a sample of my code were the frame gets created.......

 

               var fdmessarea = document.createElement('iframe');
	fdmessarea.id = 'messengerframe' + id;
	fdmessarea.name = 'messengerframe' + id;
	fdmessarea.className = 'fdmessarea';
	fdmessarea.width = '197px';
	fdmessarea.height = '180px';
	//fdmessarea.src = 'scripts/getimessages.php?uid=' + uid + '&fid=' + id;
	var date = new Date();
	fdmessarea.src = 'scripts/messengerframe.php?uid=' + uid + '&fid=' + id    +             '&date=' + date;	

 

and how the frame is populated, only works in my firefox....

i am sure the problem is here var frame = ???

but not sure how this should be to work in ie.....

var frame = parent.frames[0].document.getElementById('messengerbody' + id);
if (frame.firstChild) {
     //alert('insertmessengerwithfirstchild');
var fChild = frame.firstChild;
frame.insertBefore(messagediv,fChild);
}else{
//alert('insertmessengerwithoutfirstchild');
frame.appendChild(messagediv);
//alert('insertmessengerwithoutfirstchildafter');
}

 

thanks in advance mike....

Link to comment
Share on other sites

  • 3 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.