Results 1 to 3 of 3

Thread: Multiple Targets link

  1. #1
    Join Date
    Nov 2004
    Location
    Paris, France
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Multiple Targets link

    I'm wondering if there's a way (javascript or else) to make a link have 2 actions at the same time. For example, when I use a link on a frame, it changes (loads) 2 other frames simultaneously ? I'm not sure I'm explaining myself clearly but...

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Certainly. The general technique looks like this:

    Code:
    <a href="#" onClick="dothis(); dothat(); return false">A link</a>
    As you can see, simply seperate the functions you want to invoke with a semicolon. Regarding your question on loading two frames with one link, the following tutorial explains it best: http://www.javascriptkit.com/javatut...oframes1.shtml

  3. #3
    Join Date
    Sep 2004
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have also found that using
    <
    a href="#" on Click="dothis(), dothat()">A link</a>

    also works in some browsers. i would stick to using a ; instead of a ,

    <a href="#" onClick="dothis(); dothat(); return false">A link</a>

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
  •