Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 02-02-2005, 09:52 AM   #1
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
javascript help needed

Hi Guys:
Am having a severe brain cramp and cannot for the world of me get beyond the errors I am getting.
Basically this is what am looking for:
Detect screen resolution and do the following:
if resolution width is less than 800 pixels then the link should be low.html
if resolution width is greater than 800 pixels then link should be high.html

The new window, loading high.html needs to be loaded from a link, without toolbars, menus etc.

Thanx for any help.
Statica is offline   Reply With Quote
Old 02-02-2005, 10:06 AM   #2
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
Please ignore above question .. I had done it right .. however, my editor (HomeSite+) seems to have some sort of an issue with running JS correctly without saving the file first (as a temp file) it continually pops up errors even after successfully creating a window. I couldnt believe I was having this much trouble with it.
Anyways .. if anyone wants to look at it here goes (yeah I know its way too simple to have errors)

PHP Code:
<script language="javascript">

function 
pop()
{
var 
screen.width;
if (
w<800)
{
window.open('about:','presentation','width=800,height=600,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
}
else
{
window.open('about:','presentation','width=1024,height=768,toolbar=no,location=no,status=yes,menubar=no,scrollbars=no,resizable=no');
}
}
</script> 
If you guys only new how much time I spent trying to do it an n-number of ways till I finally decided to save and try it .. BAH!
Statica is offline   Reply With Quote
Old 02-16-2005, 12:09 AM   #3
Member (5 bit)
 
velkropie's Avatar
 
Join Date: Jan 2005
Posts: 24
homesite is a macromedia product right? are you using flash buttons to open the windows or are you doing an OnPageLoad event?

if you are using flash buttons, you have to write the code on the button's action script...
velkropie is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:17 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2