...

View Full Version : 2 qestions



Mikecotic
08-21-2005, 12:37 PM
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

vwphillips
08-21-2005, 06:53 PM
Q2



<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


<!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>

vwphillips
08-21-2005, 07:04 PM
Q1


<!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>

Mikecotic
08-21-2005, 11:08 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum