![]() |
|
|
|||||||
![]() |
HTML - Redirectiing low resolution views to open a new browser window |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
I have a frames site that uses several pages subcontracted and operated from
another site. At 1024 x 768 these pages fit well within the frames, but at 800 x 600 and lower they require their own browser windows. I am using the following script to detect screen resolution and redirect viewers: <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function redirectPage() { var url640x480 = "http://example.com/example"; var url800x600 = "http://example.com/example"; var url1024x768 = "http://example.come/example"; if ((screen.width == 640) && (screen.height == 480)) window.location.href= url640x480; else if ((screen.width == 800) && (screen.height == 600)) window.location.href= url800x600; else if ((screen.width == 1024) && (screen.height == 76 window.location.href= url1024x768; else window.location.href= url640x480; } // End --> </script> How could I modify this or another script to force the 640x480 and 800x600 pages to open in a new browser window? Inserting target="_blank" with the URL does not work! Thanks, Jim Van Abbema Jim Van Abbema |
|
|
|
|
#2 |
|
Posts: n/a
|
In article <KyCcc.11956$ .net>,
"Jim Van Abbema" <> wrote: > How could I modify this or another script to force "force" does not compute on the WWW. Consider using a more flexible layout. Google helps you find more on 'liquid design'. Cherish it, many people have been flamed to death getting this info out. -- Kris <> (nl) <http://www.cinnamon.nl/> |
|
|
|
#3 |
|
Posts: n/a
|
Sorry Kris,
If I was able access and redesign the remote pages, I would do so (they were originally designed to operate in their own windows, but the powers that be would like them to function within our frames when it's feasible to do so). I only want to detect the low resolution viewers and have them view these pages in a new browser window. Jim "Kris" <> wrote in message news:kristiaan-... > In article <KyCcc.11956$ .net>, > "Jim Van Abbema" <> wrote: > > > How could I modify this or another script to force > > "force" does not compute on the WWW. Consider using a more flexible > layout. Google helps you find more on 'liquid design'. Cherish it, many > people have been flamed to death getting this info out. > > -- > Kris > <> (nl) > <http://www.cinnamon.nl/> |
|
|
|
#4 |
|
Posts: n/a
|
In article <oVCcc.13515$ .net>,
"Jim Van Abbema" <> wrote: > If I was able access and redesign the remote pages, I would do so (they were > originally designed to operate in their own windows, but the powers that be > would like them to function within our frames when it's feasible to do so). > I only want to detect the low resolution viewers and have them view these > pages in a new browser window. In one frame, where you supply navigational links, you can use target="nameOfMainFrame" (whatever the main frame's name is) and have a link "On a low screen resolution? (<800x600)" to an alternative navigation that uses target="_blank" on all links. Is this perhaps a solution? -- Kris <> (nl) <http://www.cinnamon.nl/> |
|
|
|
#5 |
|
Posts: n/a
|
"Kris" <> wrote in message news:kristiaan-... > In article <oVCcc.13515$ .net>, > "Jim Van Abbema" <> wrote: > > > If I was able access and redesign the remote pages, I would do so > > (they were originally designed to operate in their own windows, but > > the powers that be would like them to function within our frames when > > it's feasible to do so). I only want to detect the low resolution viewers > > and have them view these pages in a new browser window. > > In one frame, where you supply navigational links, you can use > target="nameOfMainFrame" (whatever the main frame's name is) and have a > link "On a low screen resolution? (<800x600)" to an alternative > navigation that uses target="_blank" on all links. > > Is this perhaps a solution? > > -- > Kris > <> (nl) > <http://www.cinnamon.nl/> Hi Kris, Unfortunately, I had already thought of that as a solution (using a navigation frame that carries the lowres link and one without), but the link to these pages exists not only in the navigation frame but also on two other frequently modified pages... which means that whenever I update these pages I would have to create two versions (one with the lowres link, one without) of each of these pages. What a pain! That's why I was seeking a JavaScript solution. Jim |
|
|
|
#6 |
|
Posts: n/a
|
In article <n9Dcc.13524$ .net>,
"Jim Van Abbema" <> wrote: > > > If I was able access and redesign the remote pages, I would do so > > > (they were originally designed to operate in their own windows, but > > > the powers that be would like them to function within our frames when > > > it's feasible to do so). I only want to detect the low resolution > viewers > > > and have them view these pages in a new browser window. > > > > In one frame, where you supply navigational links, you can use > > target="nameOfMainFrame" (whatever the main frame's name is) and have a > > link "On a low screen resolution? (<800x600)" to an alternative > > navigation that uses target="_blank" on all links. > > > > Is this perhaps a solution? > Unfortunately, I had already thought of that as a solution (using a > navigation frame that carries the lowres link and one without), but the link > to these pages exists not only in the navigation frame but also on two other > frequently modified pages... which means that whenever I update these pages > I would have to create two versions (one with the lowres link, one without) > of each of these pages. What a pain! That's why I was seeking a JavaScript > solution. Hmm... a total of 3 extra pages instead of only one? That is not so much of a pain, considering the crippling situation the frames and the out-of-your-control website already cause you. It is more robust and easier to create than a javascript solution (which will only work sometimes). You should make a big note though, letting all involved know that one has to update all pages when necessary. -- Kris <> (nl) <http://www.cinnamon.nl/> |
|
|
|
#7 |
|
Posts: n/a
|
What about those running 600x800? (Ya, I do it) How about 1152x864?
Just design your site to maximize the use of the window (ie, don't put a big menu on the left side that reduces space by 15% - put a SMALL menu at the TOP of the page) and let the scroll bars do the work like they are supposed to when a page doesn't fit. "Jim Van Abbema" <> wrote in message news:KyCcc.11956$ link.net... > I have a frames site that uses several pages subcontracted and operated from > another site. At 1024 x 768 these pages fit well within the frames, but at > 800 x 600 and lower they require their own browser windows. I am using the > following script to detect screen resolution and redirect viewers: > > <SCRIPT LANGUAGE="JavaScript"> > <!-- Begin > function redirectPage() { > var url640x480 = "http://example.com/example"; > var url800x600 = "http://example.com/example"; > var url1024x768 = "http://example.come/example"; > if ((screen.width == 640) && (screen.height == 480)) > window.location.href= url640x480; > else if ((screen.width == 800) && (screen.height == 600)) > window.location.href= url800x600; > else if ((screen.width == 1024) && (screen.height == 76 > window.location.href= url1024x768; > else window.location.href= url640x480; > } > // End --> > </script> > > How could I modify this or another script to force the 640x480 and 800x600 > pages to open in a new browser window? Inserting target="_blank" with the > URL does not work! > > Thanks, > Jim Van Abbema > > |
|
|
|
#8 |
|
Posts: n/a
|
While the city slept, Grahammer <postmaster@127.0.0.1> feverishly typed:
> What about those running 600x800? (Ya, I do it) Erm... you do know which way up your monitor is meant to be, don't you??? Cheers, Nige -- Nigel Moss. Email address is not valid. . Take the dog out! http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com In the land of the blind, the one-eyed man is very, very busy! |
|
|
|
#9 |
|
Posts: n/a
|
in post: <news:KyCcc.11956$ hlink.net>
"Jim Van Abbema" <> said: > I have a frames site icky poo > I am using the following script to detect screen resolution there is no reliable way to determine screen resolution which has nothing to do with the available canvas area of the browser anyway. > How could I modify this or another script to force http://webtips.dan.info/force.html -- b r u c i e |
|
|
|
#10 |
|
Posts: n/a
|
On Tue, 06 Apr 2004 18:21:30 GMT, "Jim Van Abbema"
<> declared in alt.html: > I have a frames site http://html-faq.com/htmlframes/?framesareevil http://homepage.ntlworld.com/l_vajzo...eb/frames.html http://dorward.me.uk/www/frames/ http://www.google.com/webmasters/2.html (see under "Your page uses frames") > that uses several pages subcontracted and operated from another site. I assume you have their permission? It's a breach of copyright otherwise. > At 1024 x 768 these pages fit well within the frames, but at > 800 x 600 and lower they require their own browser windows. Then your design is broken. Fix it. http://www.allmyfaqs.com/faq.pl?AnySizeDesign > I am using the following script to detect screen resolution and redirect > viewers: As brucie said, there is no reliable way to detect screen resolution (if nothing else, what of those without Javascript?), and resolution is irrelevant when we are talking about the available canvas for your site. > How could I modify this or another script to force http://www.allmyfaqs.com/faq.pl?How_do_I_force http://webtips.dan.info/force.html > the 640x480 and 800x600 pages to open in a new browser window? You can't. If I want something to open in a new browser window, I'll do it myself. It's my browser, not yours. > Inserting target="_blank" with the URL does not work! It never will. My browser blocks popup windows. -- Mark Parnell http://www.clarkecomputers.com.au |
|