SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast PoGoMooSE's Avatar
    Join Date
    Feb 2002
    Location
    The Far Side
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    New Browser with image?

    Hi - does anyone know a routine in Javascript that I can use - pass it a name of an image (and path if neccessary) and it's size that will create a new browser window for me at the specified dimension with the specified image in it?
    Thanks!

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not much of a javascript guru, but here is a snippet of a function I wrote to pop a new window:
    Code:
    function helpWindow(url) {
       helpWin = window.open(url, 'helpWindow', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=500');
       helpWin.focus();
    }
    Note that the function receives the URL for the new window, which in your case would be the url of the actual image file.

    I call it in my html like so:
    Code:
    <a href="javascript:helpWindow('thedomains.php')">The Domains</a>
    That might give you a head start on what to look for in online documentation to tailor some javascript specific to your needs - namely, the window.open() method.


  3. #3
    SitePoint Enthusiast PoGoMooSE's Avatar
    Join Date
    Feb 2002
    Location
    The Far Side
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks for that..

    Cheers - that should get me going in the right direction...

    Thank you...

  4. #4
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <nevermind>
    Last edited by Anarchos; Feb 17, 2002 at 20:16.
    ck :: bringing chris to the masses.


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
  •