SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict say's Avatar
    Join Date
    Sep 2003
    Location
    At work
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need some magically added frame

    Hi,

    I have an existin gallery site which I would like to add a small top frame so I can add a flash mp3player on it. Is there a easier to go around this like using js to add it on the fly and all links when click will not refresh the player frame?

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Portsmouth UK
    Posts
    1,489
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Host Page HP1.htm
    PHP Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd"
    >

    <
    html>

    <
    head>
      <
    title></title>
    <
    script language="JavaScript" type="text/javascript">
    <!--

    function 
    CngDetail(url){
    window.frames.MainF.detail.location=url;
    }

    //-->
    </script></head>

    <body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 >
    <iframe name="MainF" src="fs1.htm" width="100%" height="100%" frameborder="0"></iframe>
    <div id="div1" style="position:absolute;z- index:2;visibility:hidden;top:50px;left:100px;width:200px;height:200px;background-color:yellow;"
    onclick="javascript:CngDetail('http://www.vicsjavascripts.org.uk/MortgageCalculator.htm');"
    >Change the location of Right Frame
    </div>
    <div id="div2" style="position:absolute;z- index:2;top:250px;left:80px;width:200px;height:200px;background-color:yellow;"

    >put whatever you want in here<br>
    Add drag and float as required
    </div>

    </body>

    </html> 
    FrameSet fs1.htm
    PHP Code:
    <html>
    <
    head>
    <
    title>No title</title>
    <
    meta name="description" content="Makes a menu frame in the left. Hyperlinks in the menu frame are targeted to the main frame.">
    </
    head>
    <
    frameset rows="1*" cols="20%, 80%">
    <
    frame name="contents" src="LF.htm" scrolling="auto" marginwidth="10" marginheight="14" namo_target_frame="detail">
    <
    frame name="detail" id="detail" src="RF.htm"  scrolling="no" marginwidth="10" marginheight="14">
    <
    noframes>
    <
    body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

    <
    p>You need a browser that supports frame to veiw this page.</p>
    </
    body>
    </
    noframes>
    </
    frameset>
    </
    html
    LH Frame LF.htm
    PHP Code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd"
    >

    <
    html>

    <
    head>
      <
    title></title>
    </
    head>

    <
    body>
    Detail
    <br>
    <
    span onclick="HideDiv('hidden');" >Hide Menu</span>
    <
    br>
    <
    span onclick="HideDiv('visible');" >Show Menu</span>
    <
    script language="JavaScript" type="text/javascript">
    <!--
    function 
    HideDiv(v){
    parent.parent.document.getElementById('div1').style.visibility=v;
    }
    //-->
    </script></body>

    </html> 
    RH Frame RF.htm
    PHP Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd"
    >

    <
    html>

    <
    head>
      <
    title></title>
    </
    head>

    <
    body>
    Content
    <br>
    </
    body>

    </
    html

    did this as an overlap menu example for someone so left it in the code


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
  •