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 1 2715
Julius Mong wrote: 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>
screen.width, for me, gives 2048, so your site would become unusable to
me, before it ever got opened. And the fact that my browser is less than
800 pixels wide doesn't help your case much. Or do you propose to
attempt to make my browser 2048 pixels wide, and only 768 pixels high? http://www.jibbering.com/faq/#FAQ4_9
When you get it "fixed" with regards to the resolution, you will be
wondering what happens when I resize my browser to larger/smaller than
the specs you chose for me (Or do you propose to attempt to stop that
also? You can't).
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.
No, PHP (or any other server side language) can't determine screen
resolution. But screen resolution is irrelevant to begin with.
top.frames['center'].location.href =
"somePageWithIrrelevantResolutionAspects.html" ;
would be a start.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kathryn |
last post by:
I hope you can help as this is driving me crazy!
I have an asp which has 3 frames on it as follows:
<FRAMESET rows="50%,*,10%">
<FRAME src="rundetailstop.asp" name="rundetailstop"...
|
by: JP |
last post by:
Hi,
How can I create a dynamic frameset whose content changes based on
user inputs?
Specifically, how do I toggle a frame within a frameset? How can I
allow a user to "close" or "dock" a...
|
by: Java_Forum |
last post by:
hi,
here is my main html file
INDEX.JSP
-------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META name="GENERATOR" content="IBM WebSphere Studio">...
|
by: Charles Crume |
last post by:
Hello;
My "index.htm" page has 3 frames (content, navigation bar, and logo).
I set the "SRC" of the "logo" frame to a blank gif image and then want to
change it's contents after the other two...
|
by: Frances Del Rio |
last post by:
sorry, but need to post entire frameset here to ask my question:
<frameset rows="79,344,107">
<frame name="header" src="header.html">
<frame name="player" src="mediaselect.html">
<frameset...
|
by: David Hayes |
last post by:
I tried finding an answer on http://www.quirksmode.org/ without success.
I am attempting a complicated Frames structure. I have made it work in IE,
but not Netscape.
I begin with three...
|
by: Frame |
last post by:
I'm looking for tutorials or articles considering HTML Frames and how to
handle them with Javascript.
E.g. samples how Frames can exchange information, can a Frame instruct
other Frame to update...
|
by: rbowie |
last post by:
Hi there
im tryin to nav to a frame using javascript.
I have a frameset within a frameset. I want to be able to navigate from
the inner most frameset to an outer frame.
So frame i have only...
|
by: Tim Streater |
last post by:
I have this arrangement of frames:
<html><head><script type="text/javascript"></script></head>
<frameset rows="100,*">
<frameset cols="135,*,165">
<frame name="logo" src="some.html"...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |