Questions tagged [document.write]

A DOM Level 2 HTML method that writes a string of text to a document stream opened by document.open().

A DOM Level 2 HTML method that writes a string of text to a document stream opened by document.open().

487 questions
11
votes
1 answer

"Save image as.." not working in Google Chrome when using window.open() and document.write()

In my app I need to allow a user to right-click on an image to save the image to disk. However, I have noticed that with my particular code, Google Chrome is the only browser that doesn't allow the user to "Save image as.." unless the user first…
Jed
  • 10,649
  • 19
  • 81
  • 125
9
votes
8 answers

What is the best way to lazy load doubleclick ads that use document.write?

Ads requested via doubleclick often get served from an ad provider network that returns javascript that in turn performs document.write to place ads in the page. The use of document.write requires that the document be open, implying that the page…
Joe Hanink
  • 4,767
  • 4
  • 19
  • 21
9
votes
6 answers

javascript document.write in external js file

Working on big, high loaded project I got the problem that already described in billion of topics on forums and blog, but there is no solution that will help in my case. Here is the story. I have the HTML code of banner, I don't know what is the…
small_jam
  • 637
  • 2
  • 7
  • 7
8
votes
3 answers

Are the javascripts loaded synchronously if one uses document.write?

Is it the same if you load javascript to the page like this: and like this