Safari: targeting frames with a javascript event does not work.

Discussion in 'Javascript' started by Marc, Nov 24, 2003.

  1. Marc

    Marc Guest

    The following code will work in Mac IE 5.1, but not in Safari 1.0
    (v85). Anyone have any hints?

    <!-- Code begins -->
    <html>
    <body>

    <a href="text2.html" target="frameContent"
    onMouseDown="alert('Hi.');">Put text2.html in frameContent</a>

    <iframe width="200" height="200" src="text.html" frameborder="yes"
    scrolling="yes" name="frameContent">

    </body>
    </html>
    <!-- Code ends -->
     
    Marc, Nov 24, 2003
    #1
    1. Advertising

  2. Marc wrote:

    > The following code will work in Mac IE 5.1, but not in Safari 1.0
    > (v85). Anyone have any hints?


    http://validator.w3.org/

    > <iframe width="200" height="200" src="text.html" frameborder="yes"
    > scrolling="yes" name="frameContent">


    Where is </iframe>?

    > </body>

    --
    David Dorward http://dorward.me.uk/
     
    David Dorward, Nov 24, 2003
    #2
    1. Advertising

  3. Marc

    Marc Guest

    Thanks. That was clumsy of me to not include the closing iframe tag. I
    also corrected any other errors that the validator caught. However, I
    am still unable to get Safari to put 'text2.html' into the
    'frameContent' target. Anyone else have solutions?


    <!-- Code begins -->
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>iframe tester</title>
    </head>
    <body>

    <a href="text2.html" target="frameContent"
    onMouseDown="alert('Hi.');">Put text2.html in frameContent</a>

    <iframe width="200" height="200" src="text.html" frameborder="1"
    scrolling="yes" name="frameContent"></iframe>

    </body>
    </html>
    <!-- Code ends -->
     
    Marc, Nov 25, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frances Valdes

    Targeting a frame on page load

    Frances Valdes, Oct 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    361
    =?Utf-8?B?Q2h1Y2sgSGFlYmVybGU=?=
    Oct 6, 2004
  2. Stephen
    Replies:
    3
    Views:
    1,081
  3. Replies:
    1
    Views:
    1,517
  4. mark
    Replies:
    0
    Views:
    90
  5. Steve Lockridge
    Replies:
    2
    Views:
    86
Loading...

Share This Page