You are not logged in. Login or Signup
Home » Messageboard » XXX » Message 49461 (Thread)

# I fixed the personality test
on my website to work in AWeb, and it broke it in IE! AAARGH. The problem is that in AWeb, you can go to another page with document.location='blah.html', but this doesn't work in IE. Whats the IE way of doing things?
(, Fri 12 Apr 2002, 8:30, archived)
# woo!
for uncle pete! :)
(, Fri 12 Apr 2002, 8:41, archived)
# While that is the favourite section
its annoying because when my friends ask Uncle Pete a question they then hassle me about updating the site every weekend at the pub :)
(, Fri 12 Apr 2002, 8:48, archived)
# Put the full address in
and see if that works.
(, Fri 12 Apr 2002, 8:41, archived)
# Arrgh!
I've fixed it now but I can't upload it because I can't FTP from work :( Oh well...
It wasn't the document.location() at fault at all, it was my CRAP javascript. I was very tired last night when I did it. I took one look at that mess this morning and went "No wonder it didn't bloody work!". I was amazed it worked in AWeb at all!
(, Fri 12 Apr 2002, 8:45, archived)
# The proper JavaScript way is
document.location.assign(bStr);

location is a read-only string in JS 1.0 and an object in JS 1.1 - so assigning a value to it should never work :(

You should be using window.location = foo;
(, Fri 12 Apr 2002, 8:49, archived)
# Ahh yeah
it probably would be better to read the standard at some point instead of looking at other peoples code ;)
(, Fri 12 Apr 2002, 8:55, archived)
# Well worth it with JavaScript
It turns out to be quite an nice language if you read the docs.
(, Fri 12 Apr 2002, 9:19, archived)
# So long as you
can figure out what each browser likes you to do, it's lovely.
Sodding Netscape 4...
(, Fri 12 Apr 2002, 9:23, archived)
# Well
seeing as I come into daily contact with 4 completely different browsers, client side scripting is something I hate :) (as you can imagine, i'm sure)
(, Fri 12 Apr 2002, 9:35, archived)