PDA

View Full Version : focusing on a element


scriptkeeper
06-17-2003, 11:17 PM
Hello everyone! I have a question about focus()? I am trying to it focus on a certain image in a frame based on some function value in the parent window! But when I try and use focus() I get an error that says "object does not support that propertie or method"? What am I doing wrong? Thanx

Fly Swatter
06-18-2003, 09:50 AM
It goes something like this:

top.window.framename.element.focus()

however you say parent window ? if as in a popup? then you need to use the window object..

var winpop = window.open(..)

winpop.framename.element.focus()

or maybe

winpop.top.window.framename.element.focus()