PDA

View Full Version : Window.location question


Var_javaMasta
04-18-2005, 03:08 AM
hey, i'm setting a link by putting onClick="window.location='whatever.htm'", but was wanting to direct it to another frame. Would i put onClick="(name of frame).location='whatever.htm'", or what?

A1ien51
04-18-2005, 03:14 AM
Why is this in DOM?

parent.frameName.location.href

Var_javaMasta
04-18-2005, 03:26 AM
sorry... im new to javascript, im really an actionscripter, but what is DOM?

codegoboom
04-18-2005, 09:23 AM
It is an acronym... ;)

glenngv
04-18-2005, 12:56 PM
hey, i'm setting a link by putting onClick="window.location='whatever.htm'", but was wanting to direct it to another frame. Would i put onClick="(name of frame).location='whatever.htm'", or what?
If the onclick is in a hyperlink, then just specify frame name in the target attribute. If not then use this:

onclick="window.open('whatever.htm', 'nameOfFrame')"