Previous Message
Next Message

RE: [css-d] Can I "pop up" a div?

Sent by Nik Schramm on 31 January 2002 12:12


You'll have to use js and the dom to extract the contents of your layer
and to write them to the new popup window. Beware: Your cross-browser
results may vary with the DOM...

For ie5+ Opera and NN6 something like this should work:

function showWindow(theLayerID) {
	var text = document.getElementById(theLayerID).innerHTML;
	var header = "<html><title>Gimme A Name</title><body>" + text +
	var newWin =,'','width=400,height=400');

Call this function by putting a link such as <a href="#"
onclick="showWindow(insertTheIdOfTheLayer); return
false;">Clickclick</a> somewhere in your document.

For other browsers you have to use different DOM methods, such as
document.layers(id) in NN4 or document.all(id) for IE4, but this should
get you started.

N i k   S c h r a m m
nae | interactive | graphic | arts
iNet: | eMail: [EMAIL-REMOVED]
Previous Message
Next Message

Message thread: