JavaScript problem - please help me - opening new browser windows doesn't work

They have: 46 posts

Joined: Jun 1999

i've tried to open a new browser window, b-ut it doesn't work. can anyone help me? this is my code:

<script language="JavaScript">
var winTwo = null
function openNav() {
winTwo = window.open("http://www.myurl.com","Heading","width=600,height=400")
self.name = "fabr"
winTwo.blur()
}
function closeNav() {
if (winTwo != null) {
winTwo.close()
}
}
</script>

the openNav() en closeNav() are triggered by buttons (onClick="openNav()").

can anyone help me?

----------
Thanks a lot,
Leech.

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Do you have a URL we could check out, it is hard to tell from the code alone. I don't see anything here that would keep it from working.

They have: 46 posts

Joined: Jun 1999

Well, the site isn't online yet, but it's ok, I solved it with another code, and that one worked...

Maybe a hint, you can find tons of working JavaScripts and DHTML on http://www.dynamicdrive.com

Thanks anyway,

Leech.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.