document.open in javascript

Discussion in 'JavaScript and AJAX' started by Cguckian, Nov 24, 2006.

  1. Cguckian

    Cguckian New Member

    Joined:
    Nov 15, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    how does it work - any help please - thanks
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
  3. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    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:
    <button onclick="open('Sample.htm');">
     Click this button and document.open() is called.
     </button>
     
    Code:
    document.open("www.go4expert.com",'newWindow',"height=350,width=600,location=no,menubar=no,resizable=no,status=no,toolbar=no,directories=no,scrollbars=yes");
     
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice