Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jan 2010
    Location
    Hackettstown, NJ
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Document.write - different results if called from function

    Using JavaScript, if I code a document.write() directly in a script coded in the body of my document, the output appears on the same page. However, if I code a document.write() in a function that is called, the output appears on a new page. Why is this?

    Thanks,
    ~Ken

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    In a function, I don't know how you direct document.write() to write to a particular place in a document. Probably better to use other methods.

Posting Permissions

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