Help nedeed urget!

F

Frane Roje

Hi,

I have a page that looks like this
<html>
<head>
<title>Testtitle>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">

<SCRIPT language="JavaScript">
<!--
function how_far() {
if( screen.width == 800 && screen.height == 600 ) return 0;
else if( screen.width == 1024 && screen.height == 768 ) return 150;
else if( screen.width >= 1280 && screen.height == 1024 ) return 250;
else return 0;
}

//-->
</SCRIPT>
</head>

How do I make it work. I don't know the exact syntax.
I just want the value of return of how_far() to be assigned to
cols variables.

<frameset rows="*" cols="javacript::how_far(),*" framespacing="0"
frameborder="NO" border="0">
<frame src="bez1.html" name="leftFrame" scrolling="NO" noresize>
<frame src="bez2.html" name="mainFrame">
</frameset>
<noframes><body>
</body></noframes>
</html>
 
E

Erwin Moller

Frane said:
Hi,

I have a page that looks like this
<html>
<head>
<title>Testtitle>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">

<SCRIPT language="JavaScript">
<!--
function how_far() {
if( screen.width == 800 && screen.height == 600 ) return 0;
else if( screen.width == 1024 && screen.height == 768 ) return 150;
else if( screen.width >= 1280 && screen.height == 1024 ) return 250;
else return 0;
}

//-->
</SCRIPT>
</head>

How do I make it work. I don't know the exact syntax.
I just want the value of return of how_far() to be assigned to
cols variables.

<frameset rows="*" cols="javacript::how_far(),*" framespacing="0"
frameborder="NO" border="0">
<frame src="bez1.html" name="leftFrame" scrolling="NO" noresize>
<frame src="bez2.html" name="mainFrame">
</frameset>
<noframes><body>
</body></noframes>
</html>

Hi,

You have 2 options I can think of:

1) Use document.write() to create your framedefinition-html.
Does this actually work?
<frameset rows="*" cols="javacript::how_far(),*" framespacing="0"
frameborder="NO" border="0">

So, check your screensettings, and write the value you want via
document.write.

2) Just create 3 different framesets.
This is much simpler.
a) Check the screen.
b) Redirect to the appropriate frameset-html

You do not have to change anything else, just create 3 different framesets.

Regards,
Erwin Moller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top