Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: 2 qestions

  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2 qestions

    QESTION ONE:

    I have 2 tables - "table1,table2"
    Table doesn't have any top property so I have to use table.style.top .Table1 should be right under table2 so I write.... table1.style.top = table2.height….

    But there would be a giant distance between them because when I assign then width to style.top .The style.top adds a "px" to the end of the width (the measuring units are different)

    how can i acomplish this goal? (make table1 to be right under table2) ...

    Qestion 2

    how can i change the width of a frame that is containd in frameset.

    <frameset id="f1" cols="50%,*">
    <frame id="f2" src="something.html" />
    <frame id="f3" src="somethingelse.html" />
    </frameset>

    should i write f1.f2.width=10 ???

    thx in advance

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,521
    Thanks
    3
    Thanked 507 Times in 494 Posts
    Q2

    Code:
    <html>
    <head>
    <meta name="description" content="Divides the pages horizontally in three frames.">
    <title>No title</title>
    </head>
    
    <frameset id="top1" rows="1*, 1*, 1*">
        <frame src="fs3t.htm" name="top" scrolling="auto" marginwidth="10" marginheight="14">
        <frame id="main" name="main" scrolling="auto" marginwidth="10" marginheight="14">
        <frame id="bottom" name="bottom" scrolling="auto" marginwidth="10" marginheight="14">
        <noframes>
    <body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
    &quot;&gt;
            <p>You need a browser that supports frame to veiw this page.</p>
        </body>
        </noframes>
    </frameset>
    </html>
    fs3t.htm
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
    
    <html>
    
    <head>
      <title></title>
    </head>
    
    <body>
    <input type="button" name="" value="Change FrameSet" onclick="CngFS();" >
    <script language="JavaScript" type="text/javascript">
    <!--
    function CngFS(){
    top.document.getElementById('top1').rows='400,50,*'
    }
    //-->
    </script>
    
    </body>
    
    </html>

  • #3
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,521
    Thanks
    3
    Thanked 507 Times in 494 Posts
    Q1
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
    
    <html>
    
    <head>
      <title></title>
    <script language="JavaScript" type="text/javascript">
    <!--
    function TablePos(t1,t2,d){
     t1=document.getElementById(t1);
     t2=document.getElementById(t2);
     t2.style.position='absolute';
     t2.style.top=(zxcPos(t1)[1]+t1.offsetHeight+d)+'px';
     alert('t2 style.top as an interga is '+parseInt(t2.style.top));
    }
    
    function zxcPos(zxc){
     zxcObjLeft = zxc.offsetLeft;
     zxcObjTop = zxc.offsetTop;
     while(zxc.offsetParent!=null){
      zxcObjParent=zxc.offsetParent;
      zxcObjLeft+=zxcObjParent.offsetLeft;
      zxcObjTop+=zxcObjParent.offsetTop;
      zxc=zxcObjParent;
     }
     return [zxcObjLeft,zxcObjTop];
    }
    
    
    
    //-->
    </script></head>
    
    <body onload="TablePos('T1','T2',50);" >
    <table id="T1" width="200" height="200" border="1">
      <tr>
        <td>.</td>
      </tr>
      <tr>
        <td>.</td>
      </tr>
    </table>
    
    <table id="T2" width="200" height="200" border="1">
      <tr>
        <td>.</td>
      </tr>
      <tr>
        <td>.</td>
      </tr>
    </table>
    
    </body>
    
    </html>

  • #4
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    who said miracales dont exsit i tried alredy 5 forums none of em get what i want u rock man thx....

    are u build the same web site as i am?????

    the u relly much man

    rock on


  •  

    Posting Permissions

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