J
Julius Mong
Dear all, I have the following:
<html>
<head>
....
</head>
<frameset ...>
<frame .../>
<frameset name="page" rows="60,*" ...>
<frame src='top.html' .../>
<frameset name="main" cols="125,95%,200" ... onload="setRes(); return
true">
<frame name='left' .../>
<frame name='center' src='page.html' .../>
<frame name='right' ... />
</frameset>
</frameset>
<frame src='blank_right.html' .../>
</frameset>
</html>
and am trying to set the frame "center" to point to a resolution specific
html doc to display using the following code placed in the <head> in the
html.
<script language="JavaScript"><!--
function setRes() {
if (screen.width<800) {
top.page.main.center.location="page640.html";
} else if (screen.width<1024) {
top.page.main.center.location="page800.html";
} else if (screen.width<1280) {
top.page.main.center.location="page1024.html";
} else if (screen.width<1600) {
top.page.main.center.location="page1280.html";
} else if (screen.width==1600) {
top.page.main.center.location="page1600.html";
}
}
//--> </script>
However, I can't get it to set the frame src location by doing
top.page.main.center.location, I have named the framesets and frames but I
just can't get it to work... any ideas? I have tried using javascript to
resize things on the page.html but it works very slow and my page needs to
be refreshed very often when in action so that's why I think i'd rather have
them in res-specific files. I presume PHP can't detect screen res right?
Please enlighten.
Thanks, Julius
<html>
<head>
....
</head>
<frameset ...>
<frame .../>
<frameset name="page" rows="60,*" ...>
<frame src='top.html' .../>
<frameset name="main" cols="125,95%,200" ... onload="setRes(); return
true">
<frame name='left' .../>
<frame name='center' src='page.html' .../>
<frame name='right' ... />
</frameset>
</frameset>
<frame src='blank_right.html' .../>
</frameset>
</html>
and am trying to set the frame "center" to point to a resolution specific
html doc to display using the following code placed in the <head> in the
html.
<script language="JavaScript"><!--
function setRes() {
if (screen.width<800) {
top.page.main.center.location="page640.html";
} else if (screen.width<1024) {
top.page.main.center.location="page800.html";
} else if (screen.width<1280) {
top.page.main.center.location="page1024.html";
} else if (screen.width<1600) {
top.page.main.center.location="page1280.html";
} else if (screen.width==1600) {
top.page.main.center.location="page1600.html";
}
}
//--> </script>
However, I can't get it to set the frame src location by doing
top.page.main.center.location, I have named the framesets and frames but I
just can't get it to work... any ideas? I have tried using javascript to
resize things on the page.html but it works very slow and my page needs to
be refreshed very often when in action so that's why I think i'd rather have
them in res-specific files. I presume PHP can't detect screen res right?
Please enlighten.
Thanks, Julius