Forum Moderators: open

Message Too Old, No Replies

Newbie javascript question

Clicking on link sets a cookie then jumps to URL

         

runner

7:13 pm on Aug 23, 2005 (gmt 0)

10+ Year Member



I don't have much experience with javascript so I'll ask this question to see if it can be done before trying to figure out how to do it...

I want to be able to click on a link (which points to some javascript code) that will set a cookie and then load a URL in the browser window. That's it.

Also, what's a good book for a javascript beginner? I have always liked the O'Reilly books. I'll check amazon to see if thay have a javascript book.

runner

10:19 pm on Aug 23, 2005 (gmt 0)

10+ Year Member



OK... I've figured out how to do this except for the line of code that specifies which URL to go to.

I can't figure out what javascript command tells the browser to go to the specified URL.

runner

10:28 pm on Aug 23, 2005 (gmt 0)

10+ Year Member



Is this the line I would use to have the browser screen change to a new URL? assuming "value" contains the name of the new URL

window.location=document.value

I don't want a new browser window to open up.