document.write writing to a specific division or location

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard

    document.write writing to a specific division or location

    In searching answers to my quest, I have been looking for a method using
    document.write to display the thumbnails in one division while showing text
    about the thumbs in another division.
    All I've seen so far is that document.write( 'does this') and that's it.
    Nobody expands on this and explains what else you can do with it.
    It's like they're more interested in showing you the ads than the
    information you need.

    Anyone have a site where document.write is discussed in depth?


  • Brett Foster

    #2
    Re: document.write writing to a specific division or location

    Richard wrote:[color=blue]
    > In searching answers to my quest, I have been looking for a method using
    > document.write to display the thumbnails in one division while showing text
    > about the thumbs in another division.
    > All I've seen so far is that document.write( 'does this') and that's it.
    > Nobody expands on this and explains what else you can do with it.
    > It's like they're more interested in showing you the ads than the
    > information you need.
    >
    > Anyone have a site where document.write is discussed in depth?
    >
    >[/color]

    Throw in all the HTML you want there, I suppose.

    But really you shouldn't be using it. Play with the DOM instead. You'll
    need to refer to some other source since it's a big topic.

    Brett

    Comment

    • Randy Webb

      #3
      Re: document.write writing to a specific division or location

      Richard wrote:
      [color=blue]
      > In searching answers to my quest, I have been looking for a method using
      > document.write to display the thumbnails in one division while showing text
      > about the thumbs in another division.
      > All I've seen so far is that document.write( 'does this') and that's it.
      > Nobody expands on this and explains what else you can do with it.
      > It's like they're more interested in showing you the ads than the
      > information you need.
      >
      > Anyone have a site where document.write is discussed in depth?
      >
      >[/color]

      If you document.write to a page after it's loaded, it destroys the page
      itself. Which means you can't do what you are wanting to do. Read the
      group FAQ and find DynWrite which does what you are wanting to do.


      There are also ways to change a current page without using innerHTML but
      innerHTML seems to be the most cross-browser/reliable way to attempt to
      do it.

      --
      Randy
      comp.lang.javas cript FAQ - http://jibbering.com/faq

      Comment

      Working...