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
https://forums.phpfreaks.com/topic/180231-help-with-iframe-please/
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

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