Forum Moderators: open

Message Too Old, No Replies

window.open() javascript not working

         

markb_1984

10:49 am on Jul 17, 2003 (gmt 0)



As a follow on from a previous post I found in this forum, I too have implemented javascript in the head tag to create an open.window template which can be utilised in the body part to create several hyperlinks. The code I'm using at the moment is:

<head>

<script type="text/javascript">

function openPopup(theURL)
{
window.open(theURL,'Title','toolbar=yes','location=no',
'directories=no','status=no','menubar=no','scrollbars=yes',
'resizable=no','width=820','height=400');
}

</script>

</head>

<body>
.
.

<a href="javascript:openPopup ('indexpf.htm')"> pf version </a>

.
.

</body>

When I click on this hyperlink, although a new window loads fully customised, the is not displayed. Can anyone tell me if there is anything wrong with the code I am using.

Thanks in advance,

Mark

[edited by: tedster at 3:04 pm (utc) on July 17, 2003]
[edit reason] disable graphic smilie [/edit]

BlobFisk

10:57 am on Jul 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, markb_1984!

You have enclosed each individual window customisation in single quotes. The single quotes should open at toolbar=yes and close at height=400:


function openPopup(theURL)
{
window.open(theURL,'Title','toolbar=yes,location=no,
directories=no,status=no,menubar=no,scrollbars=yes,
resizable=no,width=820,height=400');
}

HTH