Results 1 to 9 of 9

Thread: Quick Question

  1. #1
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default Quick Question

    Ok, is it possible so that if i click a link, two things could open in two iframes?

    Thanks
    Luke

    Moved by Agesilaus (Forum Moderator) from Designing & Development: Please post in the correct forum next time.
    Last edited by Agesilaus; 02-01-2008 at 10:44 PM.

  2. #2
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    How about something like:

    <a target="hello" href="hi3.php"><a target="hello2" href="hi.php">Open</a></a>

  3. #3
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default

    only 1 opens ,

  4. #4
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Quote Originally Posted by yabberer View Post
    only 1 opens ,
    link??

  5. #5
    Join Date
    Jul 2005
    Location
    Belgium
    Posts
    2,492
    Tokens
    147

    Latest Awards:

    Default

    I think you'll need javascript.

    like

    <a onClick="openboth();">link</a>

    & then in js you open both links in their iframes

  6. #6
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default

    http://habtown.net/Habtown_Layout_V1/testin.htm

    I've set 2 pages, wen u click, only 1 changes

  7. #7
    Join Date
    Jul 2005
    Location
    Belgium
    Posts
    2,492
    Tokens
    147

    Latest Awards:

    Default

    Quote Originally Posted by yabberer View Post
    http://habtown.net/Habtown_Layout_V1/testin.htm

    I've set 2 pages, wen u click, only 1 changes
    I've just tested out myself i got one working, holdon; il post it:

    EDIT: okay, so in my test.html I put this:

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Untitled Document</title>
    <SCRIPT LANGUAGE="JavaScript" SRC="test.js">
    </SCRIPT>
    </head>
    
    <body>
    
    <a href="#" onclick="openboth();">link</a><br />
    <br />
    <iframe name="frame1" src="a.html"></iframe>
    <iframe name="frame2" src="b.html"></iframe>
    
    </body>
    </html>
    And in my test.js (javascript file) I put this:

    Code:
    function openboth(){
    	window.frame1.location="1.html";
    	window.frame2.location="2.html";
    }
    So you want to open 1.html & 2.html in iframes frame1 & frame2 get me ?

    check, i have my test here:
    http://www.2nd-design.com/test
    Last edited by [Oli]; 02-01-2008 at 10:18 PM.

  8. #8
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default

    Quote Originally Posted by [oli] View Post
    I've just tested out myself i got one working, holdon; il post it:

    EDIT: okay, so in my test.html I put this:

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Untitled Document</title>
    <SCRIPT LANGUAGE="JavaScript" SRC="test.js">
    </SCRIPT>
    </head>
    
    <body>
    
    <a href="#" onclick="openboth();">link</a><br />
    <br />
    <iframe name="frame1" src="a.html"></iframe>
    <iframe name="frame2" src="b.html"></iframe>
    
    </body>
    </html>
    And in my test.js (javascript file) I put this:

    Code:
    function openboth(){
    	window.frame1.location="1.html";
    	window.frame2.location="2.html";
    }
    So you want to open 1.html & 2.html in iframes frame1 & frame2 get me ?

    check, i have my test here:
    http://www.2nd-design.com/test


    ahh, i see, tht's fairly simple

    Thanks, i would +rep but spread.

  9. #9
    Join Date
    Jun 2005
    Posts
    2,688
    Tokens
    0

    Latest Awards:

    Default

    You could have a javascript function to open to a location:

    Code:
    function openlink(url,windowframe) {
    
    window.open(url,windowframe);
    
    }
    <a href="#" onclick="openlink('http://google.co.uk','_parent');">Link me</a>

Posting Permissions

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