Close

Results 1 to 11 of 11
  1. #1
    DF VIP Member EUPHORiA's Avatar
    Join Date
    Dec 2000
    Location
    Manchester UK
    Posts
    363
    Thanks
    0
    Thanked:        1
    Karma Level
    0

    Default Open Links in Popup window?

    I know there is a way to open a link in a seperate popup window. Is it possible to open a link to an image in a popup window (centered) which is the EXACT same size of the image itself? if not is there a way to open a popup window from a link to a image centered and at a customizable size?

    Cheers

  2. #2
    DF VIP Member graham.edmon's Avatar
    Join Date
    May 2001
    Location
    Edinburgh
    Posts
    263
    Thanks
    0
    Thanked:        0
    Karma Level
    289

    Default

    PHP Code:
    <html>
    <
    head>
    <
    script language="JavaScript">
    <!--
    function 
    windowOpen(windowname,xsize,ysize) {
            var 
    thiswinopen('',windowname,'width='+xsize+',height='+ysize+',resizable=yes,scrollbars=yes');
            if (
    thiswin.focusthiswin.focus();
    }
    //-->
    </script>
    </
    head>
    </
    body>
    <
    a HREF="mypage.html" TARGET="picturepage" onClick="windowOpen('picturepage',640,480)">HTML Picture</a>

    or

    <
    a HREF="mypicture.jpg" TARGET="picturepage" onClick="windowOpen('picturepage',640,480)">Actual Picture</a>
    </
    body>
    </
    html
    The above code works in the way you describe, the first example HTML Picture, is the correct way of doing it. So basically the popup has HTML code in it that displays your picture.

    The second example, Actual Picture, will work on some peoples browsers and not others. You make an assumption on peoples IE/Computer configuration when doing this.

    Hope this helps

  3. #3
    DF VIP Member EUPHORiA's Avatar
    Join Date
    Dec 2000
    Location
    Manchester UK
    Posts
    363
    Thanks
    0
    Thanked:        1
    Karma Level
    0

    Default

    Cheers m8

  4. #4
    DF VIP Member EUPHORiA's Avatar
    Join Date
    Dec 2000
    Location
    Manchester UK
    Posts
    363
    Thanks
    0
    Thanked:        1
    Karma Level
    0

    Default

    i tried to use it and it opens up another another window (blank) along with the window its meant to load up as well.. any ideas?

  5. #5
    DF VIP Member graham.edmon's Avatar
    Join Date
    May 2001
    Location
    Edinburgh
    Posts
    263
    Thanks
    0
    Thanked:        0
    Karma Level
    289

    Default

    &lt;a HREF="mypage.html" TARGET="picturepage " onClick="windowOpen('picturepage ',640,480)"&gt;


    make sure that the TARGET tag and the first parameter of the call in the onClick are the same, including the case. If they are, then send me a URL or the code, and I will take a gander...

  6. #6
    DF VIP Member EUPHORiA's Avatar
    Join Date
    Dec 2000
    Location
    Manchester UK
    Posts
    363
    Thanks
    0
    Thanked:        1
    Karma Level
    0

    Default

    OK well atm i am using

    PHP Code:
    <script language="JavaScript">
    <!--
    function 
    windowOpen(windowname,xsize,ysize) {
            var 
    thiswinopen('',windowname,'width='+xsize+',height='+ysize+',resizable=yes,scrollbars=yes');
            if (
    thiswin.focusthiswin.focus(); }
    //-->
    </script
    within the head

    and this as a link

    PHP Code:
    <a HREF="gallery/carol/1/pictures.htm" TARGET="picturepage " onClick="windowOpen('picturepage ',640,480)">1</a
    Last edited by EUPHORiA; 26th August 2002 at 11:32 AM.

  7. #7
    DF VIP Member graham.edmon's Avatar
    Join Date
    May 2001
    Location
    Edinburgh
    Posts
    263
    Thanks
    0
    Thanked:        0
    Karma Level
    289

    Default

    just tried it myself, and it works fine.

    PHP Code:
    <html>
    <
    head>
    <
    script language="JavaScript">
    <!--
    function 
    windowOpen(windowname,xsize,ysize) {
            var 
    thiswinopen('',windowname,'width='+xsize+',height='+ysize+',resizable=yes,scrollbars=yes');
            if (
    thiswin.focusthiswin.focus(); }
    //-->
    </script>
    </
    head>
    <
    body>
        <
    a HREF="pictures.htm" TARGET="picturepage" onClick="windowOpen('picturepage',640,480)">1</a>
    </
    body>
    </
    html
    loaded up the pictures.htm file up fine in a sized new window.. which browser are you trying this in? are you sure there is nothing else calling a windowOpen function to open up another window?

  8. #8
    DF VIP Member EUPHORiA's Avatar
    Join Date
    Dec 2000
    Location
    Manchester UK
    Posts
    363
    Thanks
    0
    Thanked:        1
    Karma Level
    0

    Default

    using IE6 and i am 100% sure there is nothing else called open window

  9. #9
    DF VIP Member Marcus Berry's Avatar
    Join Date
    Oct 2002
    Location
    Leamington Spa
    Posts
    334
    Thanks
    0
    Thanked:        0
    Karma Level
    294

    Default

    I'm also trying to do something similar and using the above code works fine for me... Is it possible rather than have the user click some text (HTML picture in the above) you could have them click on a graphic?

  10. #10
    DF VIP Member graham.edmon's Avatar
    Join Date
    May 2001
    Location
    Edinburgh
    Posts
    263
    Thanks
    0
    Thanked:        0
    Karma Level
    289

    Default

    as above but....


    PHP Code:

    </head>
    <
    body>
        <
    a HREF="pictures.htm" TARGET="picturepage" onClick="windowOpen('picturepage',640,480)"><img src="mypic.jpg" border="0" /></a>
    </
    body>
    </
    html

  11. #11
    DF VIP Member Marcus Berry's Avatar
    Join Date
    Oct 2002
    Location
    Leamington Spa
    Posts
    334
    Thanks
    0
    Thanked:        0
    Karma Level
    294

    Default

    Originally posted by graham.edmon
    as above but....


    PHP Code:

    </head>
    <
    body>
        <
    a HREF="pictures.htm" TARGET="picturepage" onClick="windowOpen('picturepage',640,480)"><img src="mypic.jpg" border="0" /></a>
    </
    body>
    </
    html
    Thanks Graham - will give that a try this evening....

Similar Threads

  1. Some good movie links for you all
    By webslinger2k in forum Movie Talk
    Replies: 20
    Last Post: 13th March 2023, 06:12 PM
  2. Post your links for TV Show Downloads here.
    By GETanner in forum TV Talk
    Replies: 37
    Last Post: 5th March 2006, 09:16 PM
  3. open membership?
    By psxcity in forum Forum Suggestions & Feedback
    Replies: 11
    Last Post: 13th October 2002, 12:37 AM
  4. Replies: 13
    Last Post: 6th September 2002, 12:48 PM
  5. Thoughts on Open University
    By N3R0 in forum The Dog and Duck
    Replies: 24
    Last Post: 31st August 2002, 01:18 AM

Social Networking 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
  •