Forum Moderators: open
Please post a test case of your code here for us to help you out.
This is my code:
remote = window.open(newwinurl, "blankwindow", "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,width=600,height=400,screenX=50,screenY=50");
remote.title = "Title";
The title of the popup window is "http://rooturl - Title" instead of "Title".
...IE6
IE6 does not seem to exhibit this behaviour (as far as I can see). But, as RonPK states, Firefox does.
However... FF shows only the 'Title' if you pass only the filename to the window.open() function:
>>>
remote = window.open('myfile.html'); I tryed adding this, but it didn't work:
>>> remote.title = "Title";
You need to set: (but you can't get rid of the URL if it shows)
remote.document.title
But there seems to be a timing issue with FF, for example:
remote = window.open('myfile.html');
alert(remote.document.title);
alert(remote.document.title); The first alert() is empty, the second alert() has the correct title text! And likewise, you cannot set the title immediately (but ok after the alert!)?!
About the delay issue mentioned by penders, I also experienced this. See the the first of the above mentioned threads. When I used a setTimeout() to update the title I was able to do so, but it is always preceded by the URL.