View Full Version : setting window title

08-25-2005, 06:57 PM
Hi ,

When i click on a hyperlink it opens a new window,basically i open a PDF document.I am trying to set the window title but it is not getting set.Thne i found that if i open a HTML file then the window title gets set by the following code

<script language="javascript">

function callwin()
var win = window.open("event.html","mywindow","")


<a href="#" onClick="javascript:callwin()">ClickHere</a>

But instead of a html file if i give a pdf doc like this

var win = window.open("manual.pdf","mywindow","")

it opens the doc but does not set the title of the window.

How to correct this problem.Any help will be appreciated.Thanks.

08-25-2005, 07:16 PM
Because a PDF doesn't have HTML in it. You can't insert HTML.

var win=window.open("file.pdf");
win.document.title = "Title Here";
... but I don't think it'll work.

08-25-2005, 07:29 PM
Yes it did not work.Anyway thanks for trying out.please let me know if there is any other way around

08-25-2005, 07:37 PM
There isn't.