PDA

View Full Version : Need Help With Resouluton Problem


MikeL
01.06.2001, 14:07
<font face='Verdana'>
Hello Guys!


I happen to have a site that relys on the visitor reslution, therefor I wonder if someone could help me with a little something.
The thing is that i want somekind of script that hides my enter-link on the "intro"-site, til the whole site has loaded and then shows it,
what I also need is, that I want to forward visitors to the right site based upon there resolution.
- If a visitor with a resolution of 800*600 enters, I would like the script to just show enter like nothing unusual ever happend,and by then the script have then figured out that this is a visitor with a 800*600 (1024) resolution, and sends him/her to the 800*600 (1024) site, when he/she enter the site.
All this is just to avoid stupid people from entering the 1024*768 (800) resoluton section just to check -"whats behind this door?" (or if they simply don't know (???) ).
I've seen scripts that could perform one of these things but never combined (And I'm not one of those great programmers). So if someone could help me with this, I would be extremly grateful.

(( also posted at "bratta.com" ))
</font id='Verdana'>

‡‡‡‡‡‡‡‡‡‡‡
MikeL
‡‡‡‡‡‡‡‡‡‡‡

MikeL
01.06.2001, 14:14
ascii problems (swe. ascii)<img src=icon_smile_blackeye.gif border=0 align=middle>

simu
01.06.2001, 15:14
Hi

try this code:

<pre id=code><font face=courier size=2 id=code>
add this to a script section:
-------------------------------------------

if (screen.width==800||screen.height==600)
//file for 800*600 resolutions
link = "800*600.html"
else if (screen.width==640||screen.height==480)
//file for 640*480 resolutions
link = "640*480.html"
else if (screen.width==1024||screen.height==768)
//file for 1024*768 resolutions
link = "1024*768.html"
else if (screen.width>1024||screen.height>768)
//file for higher resolutions
link = "BIG.html"



//The Link witch appears if the page is loaded
document.write('<div id=\"enter\" style=\"visibility:hidden\"><a href=\"'+link+'\">enter</a></div>')


//preloads the page
if (document.layers)
document.write('<layer SRC=\"'+link+'\" visibility="hide"><\/layer>');
else if (document.all || document.getElementById)
document.write('<iframe SRC=\"'+link+'\" style=\"visibility:hidden;\"><\/iframe>');
else location.href = link;



//makes the enter visible
function visenter(){
if(document.layers){
document.enter.visibility = "show";}
else if(document.all && !document.getElementById){
document.all.enter.style.visibility = "visible";}
else if(document.getElementById){
document.getElementById('enter').style.visibility = "visible";}}

onload=visenter;

-----------------------------------
</font id=code></pre id=code>

hope it helps

greets

<center>~=| simu |=~
| [url="http://www.simu.cjb.net"]www.simu.cjb.net[/url:m70r3ujyr7] | [url="http://www.retedesign.cjb.net"]www.retedesign.cjb.net[/url:m70r3ujyr7] | [url="mailto:simuk@freesurf.ch"]simuk@freesurf.ch[/url:m70r3ujyr7] |</center>

Edited by - simu on 06/01/2001 14:17:23

Edited by - simu on 06/01/2001 14:18:45

MikeL
06.06.2001, 19:27
OK!, Thanks I'll give it a go.

«« MikeL »»