Results 1 to 7 of 7

Thread: lil html question...

  1. #1
    Morterator Immortal's Avatar
    Join Date
    Apr 2000
    Location
    Mississauga, Ontario , Canada. Behaviour : Good
    Posts
    22,671

    lil html question...

    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!

  2. #2
    Broke
    Join Date
    Jan 2001
    Location
    Northern AB, CA
    Posts
    13,506
    <p align="Center"><A HREF="#" onClick="MyWindow=window.open('document.html','MyWindow','toolbar=no,location=no,directories=no,stat us=no,menubar=no,scrollbars=no,resizable=no,width=630,height=220'); return false;">Name your link here</a></p>

  3. #3
    Morterator Immortal's Avatar
    Join Date
    Apr 2000
    Location
    Mississauga, Ontario , Canada. Behaviour : Good
    Posts
    22,671
    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?

  4. #4
    Advanced Member the_mp3_refuge's Avatar
    Join Date
    Sep 2000
    Location
    Albertsons
    Posts
    967
    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.
    "To give anything less than your best is to sacrifice the Gift."--Steve Prefontaine

  5. #5
    Morterator Immortal's Avatar
    Join Date
    Apr 2000
    Location
    Mississauga, Ontario , Canada. Behaviour : Good
    Posts
    22,671
    thanx man! I'll try it later..

  6. #6
    Morterator Immortal's Avatar
    Join Date
    Apr 2000
    Location
    Mississauga, Ontario , Canada. Behaviour : Good
    Posts
    22,671
    hey man.. I tried it... 100% 0%... all the combinations with 0 and 100% it doesnt work..

    got any other ideas?

  7. #7
    SG Enthusiast colour's Avatar
    Join Date
    Aug 2000
    Location
    Honolulu, Hawai'i
    Posts
    1,597

    try this

    <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.
    asdf?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •