Online Shopping : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to
Did You Find This Entry Useful?

46 of 117 people (39%) answered Yes
Recently 6 of 10 people (60%) answered Yes


window.location.href not working with large URL

Apr 6th, 2008 18:47
ha mo, Colin Fraser, Cory Powers,

There can be any one or more answers to this question, but try the
simplest first. 
Are you sure you have the exact address? 
Look for spaces or typos in the URL where they should not be.
If you are using <gasp>Frontpage<shudder>, look out for "code
validation", that is, extra code that <shock-horror>Frontpage<revulsion>
writes into a Web page automatically (although Frontpage 2000 is not as
bad as its predecessors in this. And yes, you may have guessed it, I
dislike Frontpage, it is built with high levels of control given to the
tool, thereby removing a lot of creativity from the author. Be that as
it may, it is still a useful rapid development tool, it got me out of a
tight spot once, although I removed my name from the page hating the result)
If you are using another tool that automatically word wraps then it may
be tossing in an end of line marker which the browser is trying to
interpret   . 
These are some of the things that can go wrong, start there. It has
always been my policy to use relative addressing in my pages, unless
accessing another site on a different server. Then I cheat, I go to the
site, copy the entire URL, then paste it, I have never had a failure in
doing this. Good luck.