Web Analytics Made Easy -
StatCounter a new window with content specified by opening statement... - CodingForum

Announcement

Collapse
No announcement yet.

a new window with content specified by opening statement...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • a new window with content specified by opening statement...

    Here is what I want to do.
    Have a button (easy enough)
    Make it (the button) open a new window (no problem)
    But open a window without specifying a URL.
    Add the content of that window with the same button.

    ex:

    <input type="button" value="wtv" onClick='window.open("","name","attributes=yes, whatever=yes"); name.innerHTML="<html><body>The content</body></html>";'>

    Is this possible?
    If yes, why is this not working?

    Thanks
    Shawn

  • #2
    Try this..

    Code:
    <input type="button" value="wtv" onClick='popup=window.open("","name","attributes=yes, whatever=yes"); popup.document.write("<html><body>The content</body></html>");'>
    Nobody is Perfect. I am Nobody.

    Comment


    • #3
      have a look there

      Promises only bind those who listen to them.

      Comment


      • #4
        Thanks a lot guys/gals, that's exactly what I needed
        Shawn

        Comment

        Working...
        X