monkeydd wrote:
Quote:
Im not sure how to do window.location?
is this right?
script type="text/javascript" >window.location.href='http://
www.google.com';</script |
"location" is a sub-object/property of the "window" object, thus it can
be referred to as "window.location".
For your purposes you could load a new page by just making an assignment
to the entire "window.location" property/object.
I found an example at
http://www.w3schools.com/js/tryit.asp?filename=tryjs_location within the
example's newLocation() function.
Although "window.location.href" also seems to work. The "entire URL"
href property (of window.location) appears to be a bit redundant. Other
properties of "windows.location" could be useful for reading or changing
portions of the URL like domain/host names and port numbers (which are
sometimes not stated - permitted to remain the default).