SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Does anyone know how to do this javascript?

    Copied from another thread

    Thanks it seems to be working for me the iframe seems to be displaying the correct page but what I need to find out know is how do this
    I want the hyperlink to be in the sidebar div so when clicked upon the page will appear in the content div.

    Thanks for your help I am sure there will be someone out their who knows more about iframes.

    <!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 name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see www.w3.org" />
    <link href="admin.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>

    <style type="text/css">
    /*<![CDATA[*/
    div.c1 {text-align: left}
    /*]]>*/
    </style>
    </head>
    <body>
    <div id="container">
    <div id="banner"><img src="Logo.gif" alt="Logo" width="770" height="150" /></div>
    <div id="navbar"></div>
    <div id="sidebar">
    <div align="center">
    <p>&nbsp;</p>
    <p><a href="addformclient.htm"> Vacancy Matcher</a></p>
    <p>&nbsp;</p>
    </div>
    </div>
    <div align="center"></div>
    <div id="content">
    <iframe src="addclientform.htm"
    width="475"
    height="275"
    scrolling="auto"
    frameborder="1">

    </iframe>

    </div>
    <div id="uppernav"></div>
    </div>
    </body>
    </html>


    Yesterday, 12:05 #4
    dtm32236
    SitePoint Enthusiast



    Join Date: Feb 2008
    Posts: 32 i'm not really sure then.... you probably have to use JavaScript...

    something like:
    add id="iframe1" to your iframe, then on the link add
    onclick="document.getElementById('iframe1').src='yourpage.html';"

    that's just a guess - but maybe something like that will work - i'm not too good with JS.


    Hi I am just wondering does anyone know more about how to do this in Javascript would be greatful for the help.

    I have upload the page to this address to show you what I mean, thanks
    http://members.lycos.co.uk/maccygee/admin.htm

  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want the hyperlink to be in the sidebar div so when clicked upon the page will appear in the content div.
    With contect div i suppose you mean the iframe?


    Then you add the "name" attribute to your iframe. And in your link you add that name as the target.

    for example:

    HTML Code:
    <a href="http://www.google.be" target="targetFrame">google</a>
    <iframe name="targetFrame" src="http://www.altavista.be"></iframe>


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
  •