[thelist] js popup images

Adam adam at hallinteractive.com
Sun Apr 21 17:11:01 CDT 2002


Erik!
that sounds awesome. I have a weak grip on js so I hope I can probe your
idea further. Far below is the code I'm using which another kind evolter
assisted me with a few months back.

so how would I write this document.write()
like this -only one line for each line of html?

<snip from another .js doc>
d.write('<style type="text/css">')
d.write('#' + this.id + 'Container { visibility:hidden; ')
d.write('left:' + left + 'px; ')
d.write('top:' + top + 'px; ')
d.write('}')
d.write('</style>')
</snip from another .js doc>

I would attempt the same for the html? Is there a resource you can point me
to that I could work this through?

have I completely misunderstood what you were saying?

thx for your help!
Adam.



<open window function>

var newWindow = new Object();
newWindow = null;

function subWin(url,wdth,hght){
   var screenTop = (screen.height / 2) - (hght / 2);
   var screenLeft = (screen.width / 2) - (wdth / 2);
   if (newWindow && !newWindow.closed) {
        newWindow.close();
   }

newWindow =
window.open(url,'newWin','width='+wdth+',height='+hght+',top='+screenTop+',l
eft='+screenLeft+',screenY='+screenTop+'
screenX='+screenLeft+',status=no,scrollbars=no,resizable=no');

   if(!newWindow.opener) {
        newWindow.opener = self;
   }
   newWindow.focus();
}

</open window function>


on 4/21/02 5:51 PM, Erik Mattheis at gozz at gozz.com wrote:

> In your window opening function, build a string which is an entire
> HTML document the includes the image. If that string variable is
> named "image_window_html" then you would say:
>
> image_window.document.open();
> image_window.document.write(image_window_html);
> image_window.document.close();
>
> This will both allow you to center your image and avoid writing 200
> html documents.

>> I'm using this juicy script I got to launch images not docs in new windows
>>
>> <a href="turnkey8/large/g_pailloading.jpg" onclick="subWin(this.href, 270,
>> 386); return false;" title="Larger Picture">
>>
>> Is there any way for me to assign an attribute to control the picture's
>> position in the new window without creating a document for it?






More information about the thelist mailing list