SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Frames Question

  1. #1
    SitePoint Addict Macromedia's Avatar
    Join Date
    Nov 2000
    Location
    New York, NY
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow Frames Question

    Hello there, all HTML Gods. I've got a question for you:

    I am using frames (don't give up on me because of tha, though) in a design I am currently working on. The frameset has three frames and in one of these I have a link that opens a new browser window. When this new browser window opens the page it opens also opens in the frame that the link is on.

    I think this may be common problem, so if anyone has a fix for this problem let me know.

    If you need more info, let me know.

    Thanks,
    -Nick

  2. #2
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you show us the code you are using? I'm pretty sure this behavious is not meant to happen - what browser are you using?

  3. #3
    SitePoint Addict Macromedia's Avatar
    Join Date
    Nov 2000
    Location
    New York, NY
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure. The page is at http://www.homenature.com/furniture click on "Seating" and, then click on the image of the sofa and then click on the larger image of the sofa and the new window pops up.

    The contents of the new window also appear on the original window in Netscape and Intrnet Explorer 5.

    Thanks!
    -Nick

  4. #4
    ********* Genius zweistein's Avatar
    Join Date
    Aug 2001
    Location
    Croatia
    Posts
    290
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of this:
    <a href="index.htm"><img src="../images/seating/sofa1med.jpg" width="234" height="180" onMouseDown="MM_openBrWindow('index.htm','furniture1','status=yes,scrollbars=yes,resizable=yes,width=653,height=500')" border="0"></a>

    Try this:
    <a href="index.htm"><img src="../images/seating/sofa1med.jpg" width="234" height="180" onMouseDown="MM_openBrWindow('index.htm','_top','status=yes,scrollbars=yes,resizable=yes,width=653,height=500')" border="0"></a>

    OR:
    <a href="index.htm" onMouseDown="MM_openBrWindow('index.htm','furniture1','status=yes,scrollbars=yes,resizable=yes,width=653,height=500')" target="_top"><img src="../images/seating/sofa1med.jpg" width="234" height="180" border="0"></a>

    I think one of these two should fix the problem.
    zweistein.web - tips&tricks for webmasters, music, programming, computers, Python, etc. new!!! English version, too!
    email | ICQ: 161202879 | AIM: zweistein2169

  5. #5
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So you don't want anything happening when the link is clicked other than the new window opening?

    This code should do just that - it will also ensure that users with javascript turned off will still get something when they click on the link:
    Code:
    <a href="index.htm" target="_blank" onClick="MM_openBrWindow('index.htm','furniture1','status=yes,scrollbars=yes,resizable=yes,width=653,height=500'); return false;"><img src="../images/seating/sofa1med.jpg" width="234" height="180" border="0"></a>
    The key to this piece of code is the "return false" - this disables the link so that clicking it does nothing after opening the new popup window. Browsers with javascript disabled will see the href="index.htm" target="_blank" bit and fire off a new browser window with index.htm in it anyway.

  6. #6
    SitePoint Addict Macromedia's Avatar
    Join Date
    Nov 2000
    Location
    New York, NY
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Thanks!

    Thanks so much guys! It works now.
    -Nick


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
  •