Click to See Complete Forum and Search --> : Picture In Pop-up...help!!!


moshlp
06-18-2003, 11:47 AM
i open a pop-up and I want to add a picture in it,how do I do that?,I give you the script of the pop-up

var myW = window.open("NEL INGLES - ANSWERS","finalAnswers"," width=400,height=400,scrollbars=yes,menubar=no,resizable=yes");
myW.moveTo(screen.width/4, screen.height/8);
myW.document.write(finalAnswers);
finalAnswers="";
//-->

Jona
06-18-2003, 11:49 AM
var myW = window.open("image.jpg","image name","width=400,height=400,scrollbars=yes,menubar=no,res
izable=yes");
myW.moveTo(screen.width/4, screen.height/8);


Jona

moshlp
06-18-2003, 12:06 PM
it doesn´t work,the image seems to appear but hen disappears.

http://nelingles.com/cancion3_avril_complicated.htm

here is the link, fill any gap, press CHECK YOUR WORK and then WHAT WAS WRONG,and I want the pic to appear in the pop-up with the answers.Here is the modified script.

var myW = window.open("/images/song_avril.gif","finalAnswers"," width=400,height=400,scrollbars=yes,menubar=no,resizable=yes");
myW.moveTo(screen.width/4, screen.height/8);
myW.document.write(finalAnswers);
finalAnswers="";

Jona
06-18-2003, 12:12 PM
That is because you're using document.write() to write text. Try this:


var myW = window.open("","finalAnswers"," width=400,height=400,scrollbars=yes,menubar=no,res
izable=yes");
myW.moveTo(screen.width/4, screen.height/8);
myW.document.write("<img src='/images/song_avril.gif'><br>"+finalAnswers);
finalAnswers="";


Jona

moshlp
06-18-2003, 12:23 PM
great,thanx

Jona
06-18-2003, 12:25 PM
You're welcome.

Jona