Results 1 to 7 of 7

Thread: window.open->getElementById.open

  1. #1
    Join Date
    Jan 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default window.open->getElementById.open

    Hi everybody!
    Is this possible to open the document, not in a new window, like this - javascript:window.open(...)
    but in the same page, in div, which we will take with getElementById.

    I mean: document.getElementById('name_of_div').open(...)

  2. #2
    Join Date
    Jan 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I have just made it with iframe.

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    You can use ajax even for this purpose. I mean you can make an ajax call to the server, get the page content and insert the content in a div in your page.

    Sure iframes will do but they'll load it as a different page itself, a separate window in the main window. Moreover iframes has its own issues especially cross-browser.

  4. #4
    Join Date
    Aug 2008
    Location
    karanganyar, solo, indonesia
    Posts
    161
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    yes, you can use ajax, it is imposible to do like what you want kofg
    ///////////////////////////////////////////////////
    ///// http://www.mediatutorial.web.id
    ///////////////////////////////////////////////////

  5. #5
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Maybe this?
    Jeremy | jfein.net

  6. #6
    Join Date
    Aug 2008
    Location
    karanganyar, solo, indonesia
    Posts
    161
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    hi nile, DHTML window widget is also use iframe that inserted to div.

    so , kofgarter can open onother page on his div bu inserting iframe (that containing targeted url of page ) to his div.
    ///////////////////////////////////////////////////
    ///// http://www.mediatutorial.web.id
    ///////////////////////////////////////////////////

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Widget can also use AJAX, four ways actually:

    Four types of content supported within each window: 1) Inline Text, 2) HTML from an invisible DIV on the page, 3) An external page shown inside an IFRAME, or 4) An external page on the same site fetched via Ajax.
    But for another page, it requires AJAX or iframe. However, with AJAX (Widget AJAX or other AJAX), scripts on the imported page are generally not run, and stylesheets on the imported page are generally not followed. Also, with AJAX, paths on the the external page, if relative, must be relative to the 'top' page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •