Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Applying Style Sheet to a popup


Message #1 by Terrence Joubert <Terrence@v...> on Tue, 4 Sep 2001 14:09:42 +0400
Thanks Alex,
It works
Terrence

-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]
Sent: Tuesday, September 04, 2001 2:54 PM
To: JavaScript HowTo
Subject: [javascript_howto] RE: Applying Style Sheet to a popup


Just write your CSS declaration to the window like the rest of the HTML
you're putting into it
		
		d.write("<HTML>");
		d.write("<HEAD>");
		d.write("<LINK rel="stylesheet" type="text/css"
href="image.css">");
		d.write("<Title>" + strTitle + "</Title>");	
		d.write("</HEAD>");
		d.write("<H1>" + strName + "</H1>");		
		d.write("<H4>" + strDescription + "</H4>");
		d.write("<IMG SRC=" + strPicURL + " ALT='The Image is not

-----Original Message-----
From: Terrence Joubert [mailto:Terrence@v...]
Sent: 04 September 2001 11:10
To: JavaScript HowTo
Subject: [javascript_howto] Applying Style Sheet to a popup


Hi,

I have this function that is supposed to open a popup window and show an
image.
How do I apply a style-sheet image.css to this pop-up window?

function  jsShowPopup(strPicURL, strWindowName, strTitle, strName,
strDescription)
	{
		var w; 
		var d;

		w = window.open("", strWindowName,'left=0,top=0, scrollbars,
resizable, status');
		
		d = w.document;

		d.write("<Title>" + strTitle + "</Title>");	
		d.write("<H1>" + strName + "</H1>");		
		d.write("<H4>" + strDescription + "</H4>");
		d.write("<IMG SRC=" + strPicURL + " ALT='The Image is not
available' ALIGN=LEFT ></IMG>");				
		d.close();
	}


Many thanks

Terrence

  Return to Index