SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    On Top Popup Window

    I have a link
    <a href="doc.pdf" onClick="javascriptopenWindow('doc.html')">

    This works fine.

    It loads the pdf into the window and pops up my window.

    But after the PDF is loaded the popup window is not on top, where I would like it.

    How can I acheive these results??
    Last edited by meztec; Dec 17, 2001 at 14:43.

  2. #2
    Are you ready for BSD? Marshall's Avatar
    Join Date
    Dec 2001
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    window objects have a
    focus
    method for that so
    window.focus()
    brings the current window to the front,
    var win = open ('whatever.html', 'windowName');
    ...
    win.focus();
    brings the window with reference win to the front.
    from http://faqts.com/knowledge_base/view...d/1766/fid/124

    - Marshall

  3. #3
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got an error when trying to open your link so I will post a bit of code explaining what you were showing him Marshall.

    Code:
    <a href="javascript:void(0)" onclick="openWin('doc.pdf')">link</a>
    in your head

    Code:
    function openWin(doc){
        var win=window.open(doc,"winname");
        win.focus();
    }
    That should work and will also allow you to reuse the code elsewhere
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  4. #4
    Are you ready for BSD? Marshall's Avatar
    Join Date
    Dec 2001
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Mael.. it seems the site I referenced died


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
  •