0

I just need some quick help on this, hopefully it should be simple.

window.open().document.write("Hello world!");

This function opens a new tab with the text "Hello world!" in it, which is what I want. However, in Google Chrome, the address bar displays "about:blank" and Safari displays a blank address bar. In Internet Explorer, Firefox, and Opera, it displays the same URL as it was opened from the parent tab, the exact result I want in all browsers. How can I get the address bar to display the same URL as it was opened from the parent tab in Google Chrome and Safari? Thanks for all the help.

2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by Taywin
0

I can't seem to find a newer version for Window object in W3C... Anyway, according to the version I found, opening a new window is not set as standard. Yet, when I look at how the function should be used at W3school, it shows that you could specify the URL to be loaded. Currently, you simply open a blank window and write content "Hello world!" to the document page.

Edited by Taywin

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.