PDA

View Full Version : lil html question...



Immortal
08-17-01, 11:17 AM
very simple... very simple...

let's say I have a thumbnail to a picture... and I want a new window to appear but it should be the size of the picture ..

u know a lil pop up window that does the trick... but without all the buttons ant things...

I'll go try it on my own.. I'll check back in a few.. thanx!

Chris
08-17-01, 12:05 PM
<p align="Center"><A HREF="#" onClick="MyWindow=window.open('document.html','MyWindow','toolbar=no,location=no,directories=no,status=no,men ubar=no,scrollbars=no,resizable=no,width=630,height=220'); return false;">Name your link here</a></p>

Immortal
08-17-01, 12:30 PM
yeap.. thanx.. I already have that..

I want it to be dynamic.. yah know..

so that it 'll be exactly the size of the picture.. no matter how big or how small it is..

is that dooable?

the_mp3_refuge
08-18-01, 03:02 AM
Yep it sure is. Just change the width, and height settings to either 100% or 0%. Make sure that you put the % symbol in or you'll have a square instead of ur image lol. Just play around with the %'s. Either 100%, or 0%, one of those will work just too tired to think right now lol.

Immortal
08-18-01, 10:04 AM
thanx man! I'll try it later..

Immortal
08-19-01, 01:09 AM
hey man.. I tried it... 100% 0%... all the combinations with 0 and 100% it doesnt work..

got any other ideas?

colour
08-26-01, 11:12 AM
<script language="javascript">

<!-- begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

// end -->

</script>

that goes before the </head> tag

the link should be like this

<a href="putimagedirhere" onclick="NewWindow(this.href,'putnamehere','400','400','yes');return false;"><img src="putimagedirhere" border="0" alt="putcaptionhere"></a>

you see where it says '400','400' those are the width and length in PIXELS. you have to set those to the PIXELS of the image.

when you use %s its doing something totally different.