Note that there are some explanatory texts on larger screens.

plurals
  1. POSafari fails to display the window title of a dynamically created page
    primarykey
    data
    text
    <p>I create an empty popup window to which I write html code, including a title tag. This has worked before on all browsers, but Safari 5 or 6 do not work.</p> <p>The code (minimized example code):</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt; &lt;title&gt;Main Window Title&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;The main page opens a second window:&lt;/p&gt; &lt;SCRIPT language="JavaScript" type="text/javascript"&gt; myWindow = window.open(); myWindow.focus(); myWindow.document.write("&lt;html&gt;&lt;head&gt;&lt;title&gt;The Other Window Title&lt;\/title&gt;&lt;\/head&gt;&lt;body&gt;&lt;p&gt;Some text&lt;\/p&gt;&lt;\/body&gt;&lt;\/html&gt;"); myWindow.document.close(); &lt;/SCRIPT&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>In Firefox this results in a main page titled "Main Window Title" and a second window titled "The Other Window Title".</p> <p>But in Safari, the second window's title remains the generic "Untitled".</p> <p>To me, the Safari behavior appears to be a bug, but I wonder if there is a way to make it work anyway?</p> <p>(If I supply an url parameter to the <code>window.open</code>, where the url is a web page with a title tag, then it displays correctly, but I do of course not want that since I want it to be dynamically created. I also tried inserting <code>myWindow.document.title = "A new title";</code> but it did not have any effect in Safari, (but it has in Firefox).)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload