G
Guest
Hi,
I am starting a new project to build a software product using APS.NET 2.0.
In past I have used "frameset" and "frame" to build pages. My current
requirements I have coded using frameset and frame like code below.
My question is, because this is a new development is it good to use frameset
and frame or I can use some thing better. I am looking for expert suggestions
on my code below is this a good way to move or I should not use frames.
As you know I am not an ASP.NET expert I am just looking for correct
direction on new ASP.NET development not details.
Thanks a lot,
Ashok
Code
---------
***********
default.htm
***********
<html>
<head>
<script type="text/javascript">
var columntype=""
var defaultsetting=""
var currset3=""
var currset4=""
function getCurrentSetting()
{
if (document.body)
return (document.body.cols) ? document.body.cols :
document.body.rows
}
function setframevalue(coltype, settingvalue)
{
if (coltype=="rows")
document.body.rows=settingvalue
else if (coltype=="cols")
document.body.cols=settingvalue
}
function resizeFrame(contractsetting)
{
if (getCurrentSetting() != defaultsetting)
setframevalue(columntype, defaultsetting)
else
setframevalue(columntype, contractsetting)
}
function init()
{
if (!document.all && !document.getElementById)
return
if (document.body!=null)
{
columntype=(document.body.cols)? "cols" : "rows"
defaultsetting=(document.body.cols)? document.body.cols :
document.body.rows
}
else
setTimeout("init()",100)
}
setTimeout("init()",100)
</script>
</head>
<frameset cols="20%,80%">
<frame src="C:\Temp\tree.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\main.htm" scrolling="auto" frameborder="0">
</frameset>
</html>
*********
tree.htm
*********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascriptarent.resizeFrame('25,*')">+</a>
</td>
</tr>
</TABLE>
</body>
</html>
*********
main.htm
*********
<html>
<head>
<script type="text/javascript">
var columntype=""
var defaultsetting=""
var currset3=""
var currset4=""
function getCurrentSetting()
{
if (document.body)
return (document.body.cols) ? document.body.cols :
document.body.rows
}
function setframevalue(coltype, settingvalue)
{
if (coltype=="rows")
document.body.rows=settingvalue
else if (coltype=="cols")
document.body.cols=settingvalue
}
function resizeFrame(contractsetting)
{
if (getCurrentSetting() != defaultsetting)
setframevalue(columntype, defaultsetting)
else
setframevalue(columntype, contractsetting)
}
function resizeFrame1(contractsetting)
{
if (currset3 == '')
{
currset3=getCurrentSetting()
setframevalue(columntype, contractsetting)
}
else
{
setframevalue(columntype, currset3)
currset3=""
}
}
function resizeFrame2(contractsetting)
{
if (currset4 == '')
{
currset4=getCurrentSetting()
setframevalue(columntype, contractsetting)
}
else
{
setframevalue(columntype, currset4)
currset4=""
}
}
function init()
{
if (!document.all && !document.getElementById)
return
if (document.body!=null)
{
columntype=(document.body.cols)? "cols" : "rows"
defaultsetting=(document.body.cols)? document.body.cols :
document.body.rows
}
else
setTimeout("init()",100)
}
setTimeout("init()",100)
</script>
</head>
<frameset rows="50%,40%,5%,5%">
<frame src="C:\Temp\page1.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\page2.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\page3.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\page4.htm" scrolling="auto" frameborder="0">
</frameset>
</html>
**********
page1.htm
**********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascriptarent.resizeFrame('44,*,44,44')">Page 1</a>
</td>
</tr>
</TABLE>
</body>
</html>
**********
page2.htm
**********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascriptarent.resizeFrame('44,*,44,44')">Page 2</a>
</td>
</tr>
</TABLE>
</body>
</html>
**********
page3.htm
**********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascriptarent.resizeFrame1('44,44,*,44')">Page 3</a>
</td>
</tr>
</TABLE>
</body>
</html>
***********
page4.htm
***********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascriptarent.resizeFrame2('44,44,44,*')">Page 4</a>
</td>
</tr>
</TABLE>
</body>
</html>
I am starting a new project to build a software product using APS.NET 2.0.
In past I have used "frameset" and "frame" to build pages. My current
requirements I have coded using frameset and frame like code below.
My question is, because this is a new development is it good to use frameset
and frame or I can use some thing better. I am looking for expert suggestions
on my code below is this a good way to move or I should not use frames.
As you know I am not an ASP.NET expert I am just looking for correct
direction on new ASP.NET development not details.
Thanks a lot,
Ashok
Code
---------
***********
default.htm
***********
<html>
<head>
<script type="text/javascript">
var columntype=""
var defaultsetting=""
var currset3=""
var currset4=""
function getCurrentSetting()
{
if (document.body)
return (document.body.cols) ? document.body.cols :
document.body.rows
}
function setframevalue(coltype, settingvalue)
{
if (coltype=="rows")
document.body.rows=settingvalue
else if (coltype=="cols")
document.body.cols=settingvalue
}
function resizeFrame(contractsetting)
{
if (getCurrentSetting() != defaultsetting)
setframevalue(columntype, defaultsetting)
else
setframevalue(columntype, contractsetting)
}
function init()
{
if (!document.all && !document.getElementById)
return
if (document.body!=null)
{
columntype=(document.body.cols)? "cols" : "rows"
defaultsetting=(document.body.cols)? document.body.cols :
document.body.rows
}
else
setTimeout("init()",100)
}
setTimeout("init()",100)
</script>
</head>
<frameset cols="20%,80%">
<frame src="C:\Temp\tree.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\main.htm" scrolling="auto" frameborder="0">
</frameset>
</html>
*********
tree.htm
*********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascriptarent.resizeFrame('25,*')">+</a>
</td>
</tr>
</TABLE>
</body>
</html>
*********
main.htm
*********
<html>
<head>
<script type="text/javascript">
var columntype=""
var defaultsetting=""
var currset3=""
var currset4=""
function getCurrentSetting()
{
if (document.body)
return (document.body.cols) ? document.body.cols :
document.body.rows
}
function setframevalue(coltype, settingvalue)
{
if (coltype=="rows")
document.body.rows=settingvalue
else if (coltype=="cols")
document.body.cols=settingvalue
}
function resizeFrame(contractsetting)
{
if (getCurrentSetting() != defaultsetting)
setframevalue(columntype, defaultsetting)
else
setframevalue(columntype, contractsetting)
}
function resizeFrame1(contractsetting)
{
if (currset3 == '')
{
currset3=getCurrentSetting()
setframevalue(columntype, contractsetting)
}
else
{
setframevalue(columntype, currset3)
currset3=""
}
}
function resizeFrame2(contractsetting)
{
if (currset4 == '')
{
currset4=getCurrentSetting()
setframevalue(columntype, contractsetting)
}
else
{
setframevalue(columntype, currset4)
currset4=""
}
}
function init()
{
if (!document.all && !document.getElementById)
return
if (document.body!=null)
{
columntype=(document.body.cols)? "cols" : "rows"
defaultsetting=(document.body.cols)? document.body.cols :
document.body.rows
}
else
setTimeout("init()",100)
}
setTimeout("init()",100)
</script>
</head>
<frameset rows="50%,40%,5%,5%">
<frame src="C:\Temp\page1.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\page2.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\page3.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\page4.htm" scrolling="auto" frameborder="0">
</frameset>
</html>
**********
page1.htm
**********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascriptarent.resizeFrame('44,*,44,44')">Page 1</a>
</td>
</tr>
</TABLE>
</body>
</html>
**********
page2.htm
**********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascriptarent.resizeFrame('44,*,44,44')">Page 2</a>
</td>
</tr>
</TABLE>
</body>
</html>
**********
page3.htm
**********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascriptarent.resizeFrame1('44,44,*,44')">Page 3</a>
</td>
</tr>
</TABLE>
</body>
</html>
***********
page4.htm
***********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascriptarent.resizeFrame2('44,44,44,*')">Page 4</a>
</td>
</tr>
</TABLE>
</body>
</html>