Results 1 to 6 of 6

Thread: Open link with onmouseover in a different frame????

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100

    Unhappy Open link with onmouseover in a different frame????

    Hi, I need help with whis problem.

    I want to load a page in a different frame on an "onmouseover" event.

    Does anyone know how I do this?

    This works but not in a different frame
    QUOTE]<a href="länk1.htm" onMouseover="location.href='länk1pre.htm'">Länk 1</a>[/QUOTE]

    Thanks!

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    This should do it...

    Code:
    <a href="länk1.htm" onMouseover="document.frames('frame1').src='länk1pre.htm'">Länk 1</a>
    To elaborate,

    The javascript document object has a frames collection. You specify which frame you want to 'control' and then supply the function/method name.

    eg. document.frames('framename').function.method (=var);
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  3. #3
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Remember though that some browsers/users don't have JavaScript so it will break in some browsers. You can also provide a backup for those users using the <noscript></noscript> tags.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100
    Thanks!

    JavaScript is supported in the most common browsers like IE, Opera and Netscape and the other 0.01% am I going to ignore =)

    Thanks once again!

    // Johan

  5. #5
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Well it's up to you obviously, but just because the browsers have JavaScript doesn't mean everyone keeps it turnt on.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100
    ah! God point!

    Well, I have to think about it then...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width