Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    InnerHTML from another page?

    hello, I have a question. I would like to know how I can have javascript get the innerHTML from another page's div.

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Posts
    728
    Thanks
    35
    Thanked 132 Times in 123 Posts
    You can open the other page in its own window, or load it in an iframe in the current window document, if both pages are on the same server domain.

    You can also get the literal html source of the page with an xmlHttpRequest (AJAX).
    Last edited by mrhoo; 08-16-2008 at 10:47 PM.

  • #3
    New Coder
    Join Date
    Aug 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ah yeah that's what I was looking for, but I couldn't remember what it was called.

    yeah basically I'm trying to get one page to auto-update its contents based on the contents of another page.


  •  

    Posting Permissions

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