NameSilo

How do these web redirection scripts work?

SpaceshipSpaceship
Watch

Rhino1616

Established Member
Impact
0
Good Morning, I'm a big rookie web designer and I created my website for 3 different sizes/resolutions (640x480, 800x600, 1024-768). I found all these web redirection scripts on the web, that redirect the user to the right size/rez for thier montior but Im a bit confused. Does this mean I have to register 3 individual web domain names for these scripts to work? I have one www.myname.com site registered already, and I wouldnt want to purchase/register a bunch of others, I thought the redirect script could work with 1 domain name, or am I wrong? Does someone know how these types of scripts work?

Thank you for your time.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
in the script there should be a bit defining your domain of the page

simply put the 3 different websizes in 3 folders

eg

640
800
1024

and in the domain do it so that the 800x600 thingy is www.domain.com/800
 
0
•••
Right if you want to do different sites for each screen res then just follow adams instructions. But my advice is to just do one site for 800x600, as this is the size that most people have. Any site I design I use 800x600. The problem with doing three differnet sites for the differenet screen res is one that it takes up a lot of space o your server (Three times as much), but most importantly most search engine bots wont index your sites as they dont like this type of redirection on your index page.

Just a few points you should consider!!
 
0
•••
Thanks for the info, Ill look into it & if i have any problems Ill get back to you.
 
0
•••
Hi everyone. I tried the advice you gave and it seems to kinda work, what I mean is that it does redirect the page, unfortunately I designed my website in frames. My webpage has 3 frames a banner, middle/body, and a footer. I added the script to the middle frame because I cant & dont know where to add the script in the index page of a framed website, or if you can even add the script to the index page of a frames website. The script I added looks like this:

<script language="JavaScript1.2">
<!--

if (screen.width==800||screen.height==600) //if 800x600
window.location.replace("http://uniteddistributorscanada.hypermart.net/")

else if (screen.width==640||screen.height==480) //if 640x480
window.location.replace("http://uniteddistributorscanada.hypermart.net/")

else if (screen.width==1024||screen.height==768) //if 1024x768
window.location.replace("http://uniteddistributorscanada.hypermart.net/1024x768")

else //if all else
window.location.replace("http://uniteddistributorscanada.hypermart.net/1024x768")

//-->
</script>

If you go to the website you'll notice depending on the resolution that you have the entire new page is redirected into the main body of the framed site (where I added the script). Is there any way to fix this, and have the whole page redirect. You can view the website at: http://uniteddistributorscanada.hypermart.net/

Thank you

PS: heads up on the pop ups
 
0
•••
Hi guys, I think Im almost there. I added a free script I found on the web to my index.htm page and it looks like this:

<script language="JavaScript1.2">
<!--

/*
Screen Size Redirect script (By Robert @ http://members.tripod.com/technological_tinker/ )
Submitted to Dynamicdrive.com to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/


if (screen.width==800||screen.height==600) //if 800x600
window.location.replace("http://www.netscape.com")

else if (screen.width==640||screen.height==480) //if 640x480
window.location.replace("http://www.microsoft.com")

else if (screen.width==1024||screen.height==76 //if 1024x768
window.location.replace("http://www.dynamicdrive.com")

else //if all else
window.location.replace("http://freewarejava.com")

//-->
</script>


So I just altered the script and added the urls to it, and this is what it looks like in my index page:


<script language="JavaScript1.2">
<!--

/*
Screen Size Redirect script (By Robert @ http://members.tripod.com/technological_tinker/ )
Submitted to Dynamicdrive.com to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/


if (screen.width==800||screen.height==600) //if 800x600
window.location.replace("http://www.uniteddistributors.ca")

else if (screen.width==640||screen.height==480) //if 640x480
window.location.replace("http://www.uniteddistributors.ca")

else if (screen.width==1024||screen.height==76 //if 1024x768
window.location.replace("http://www.uniteddistributors.ca/1024x768/")

else //if all else
window.location.replace("http://www.uniteddistributors.ca/1024x768/")

//-->
</script>


I added to the frames index.htm page & tested it out, and it seemed to work perfectly. I did a few other touch ups and uploaded it & when I viewed it, it didnt redirect. If your rez is at 800x600 and you visit the site at: http://www.uniteddistributors.ca/ it looks alright, but if your rez is 1024x768 it wont redirect to the 1024x768. I tested it out to see if the pages are on the web by typing the url directly and its there: http://www.uniteddistributors.ca/1024x768/
Do you know, whats wrong? I have a funny feeling its something very simple. If there's any help you can give I'd appreciate it.

Thank you
 
0
•••
0
•••
HA,HA,HA,HA.I almost died laughing when you helped me notice that. I look into it right away.

Thanks adam_UK
 
0
•••
I'm back. Would you believe it adam, but that was just a typo error in my post. It says 786 in my file not 76 like it shows on the post. strange I wonder whats wrong?
 
0
•••
Hi guys. I finally got it working :). I wanted to thank you guys for the time and help you gave me.

Thanks again
 
0
•••
no problem, what was wrong?
 
0
•••
It was all a typo & placement error on my part, The url to redirect to was wrong & typed wrong, and i accidently uploaded 2 index.htm pages to my main site on the web, which confused the redirect javascript that i add to my webpage.

Thanks again for the help :)
 
0
•••
ah right cool :)
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back