SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Evangelist -T-'s Avatar
    Join Date
    Jun 2002
    Posts
    444
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    one link opening two pages

    I want one link to open two pages inside two imageframes (just to make it easier)

    I hope this is posible, or I'll start crying
    chrome is a wrapper that combines a browser with spyware

  2. #2
    SitePoint Member
    Join Date
    Sep 2003
    Location
    Germany
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:
    Code:
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    <SCRIPT LANGUAGE = "JavaScript">
    function Fensteroffen() {
    Fenster1=window.open("test1.htm", "info1");
    Fenster2=window.open("test2.htm", "info2");
    }
    </script>
    </HEAD>
    <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
    
    <form>
    <input type="image" src="p1.gif"  border ="0" alt="weiter" onclick="Fensteroffen()"'>
    </form>
    </BODY>
    </HTML>

  3. #3
    SitePoint Evangelist -T-'s Avatar
    Join Date
    Jun 2002
    Posts
    444
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    won't that just open 2 new windows??
    chrome is a wrapper that combines a browser with spyware

  4. #4
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Indeed it will... something more like will do the job:
    Code:
    function openLinks(targetFrameName1,targetURL1,targetFrameName2,targetURL2)
    {
    top.frames[targetFrameName1].document.location.href=targetURL1;
    top.frames[targetFrameName2].document.location.href=targetURL2;
    }
    Note that (if it would be of any use to you) you could easily revise the function to accept any number of frame name + URL pairs using either variable numbers of arguments, or by using arrays as arguments.

    However, I shall leave that as an exercise for you to do *yourself*, unless Beetle can't resist of course...
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  5. #5
    SitePoint Evangelist -T-'s Avatar
    Join Date
    Jun 2002
    Posts
    444
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that worked, thanks
    chrome is a wrapper that combines a browser with spyware


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
  •