Form.target |
the window for form results |
Availability
JavaScript 1.0;
Inherits from/Overrides
read-only in Internet Explorer 3
Synopsis
form.target
Description
target is a
read/write string property of the Form object. It specifies the name
of the frame or window in which the results of the submission of
form should be displayed. The initial
value of this property is specified
by the target attribute of the
<form> tag. If unset, the default is that
form submission results appear in the same window as the form.
Note that the value of target is the
name of a frame or window, not the actual
frame or window itself. The name of a frame is specified by the
name attribute of the
<frame> tag. The name of a window is
specified when the window is created with a call to the
Window.open( ) method. If
target specifies the name of a window that does
not exist, the browser automatically opens a new window to display
the results of form submission, and any future forms with the same
target name use the same newly created window.
Four special target names are supported. The target named
"_blank" specifies that a new, empty browser
window should be created and used to display the results of the form
submission. The target "_self" is the default; it
specifies that the form submission results should be displayed in the
same frame or window as the form itself. The target
"_parent" specifies that the results should be
displayed in the parent frame of the frame that contains the form.
Finally, the "_top" target specifies that the
results should be displayed in the topmost frame -- in other
words, all frames should be removed, and the results should occupy
the entire browser window.
You can set this property in IE 3, but doing so has no effect on the
actual target of the form.
See Also
Link.target
|