document.open in javascript

Cguckian's Avatar, Join Date: Nov 2006
Newbie Member
how does it work - any help please - thanks
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
You have submitted this in Articles and source code section. Moved to the Queries and discussion forum .
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Opens a new window and loads a document specified by a given URL. This method can also be used to open a new window which uses the sUrl and sWindowName parameters to collect the output of the write and writeln methods.

Parameters:

sUrl => Required. When opening a new window, sUrl is a String that specifies the URL to render in the new window.

sName => Optional. When opening up a new document, specifying the String replace for sName designates that the new document is to replace the current document in the history list. Other values are _blank,_parent,_top.

sFeatures => Optional. This String parameter is a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes").

Example:

HTML Code:
<button onclick="open('Sample.htm');">
 Click this button and document.open() is called.
 </button>
Code: JavaScript
document.open("www.go4expert.com",'newWindow',"height=350,width=600,location=no,menubar=no,resizable=no,status=no,toolbar=no,directories=no,scrollbars=yes");