|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
Join Date: Jan 2002
Location: Barcelona
Posts: 85
|
js redirect not working
Hi,
I´m using the following js to redirect form an external js file: if (screen.width==800||screen.height==600) //if 800x600 window.location.replace("http://www.glasgowapartment.co.uk/index800.htm") else if (screen.width==640||screen.height==480) //if 640x480 window.location.replace("http://www.microsoft.com") else if (screen.width==1024||screen.height==768) //if 1024x768 window.location.replace("http://www.glasgowapartment.co.uk") else //if all else window.location.replace("http://freewarejava.com") but somethings not right as when I press go in the address bar it does redirect the address it is searching for but nothing else happens ... the address and the status bar just flicker away. Difficult to explain but if you have 800*600 resolution you can see by entering www.glasgowapartment.co.uk Any ideas would be appreciated. |
|
|
|
|
|
#2 |
|
Moderator
Staff
Premium Member
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
|
See what happens when you put it directlty into the page's syntax - I've had trouble sometimes with the pages calling for external script.
Hope that helps, kram
__________________
"For today, goodbye. For tomorrow, good luck. And forever, Go Blue!"
University of Michigan President Mary Sue Coleman |
|
|
|
|
|
#3 |
|
Member (7 bit)
Join Date: Jan 2002
Location: Barcelona
Posts: 85
|
nope ... just the same. one interesting twist is that when I use Dreamweaver and the Preview in Browser command it works fine, but as soon as I upload it and try it for real ... the address bar and status bar fill with the correct destination but just flicker away.
|
|
|
|
|
|
#4 |
|
Member (7 bit)
Join Date: Jan 2002
Location: Barcelona
Posts: 85
|
OK, I think I´ve got to the bottom of it ... I was adjusting my screen resolution whilst the browser was open and then retrying the redirect. If I close the browser and adjust then reopen it seems to work.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|