English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Ok... what am I doing wrong... first here's the function I'm using...

function ccvpopup(url)
{
newwindow=window.open(url,'ccvcode','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}

And the call for it...



Thanks

2006-07-19 05:13:29 · 3 answers · asked by Duds331 5 in Computers & Internet Programming & Design

The problem I am having is it just opening in the same window, not a new one... I'm using JS because i am also going to disable toolbars and all once i get it working.

2006-07-19 05:14:23 · update #1

3 answers

how to learn it
http://www.javascript-coder.com/window-popup/javascript-popup-window.phtml
http://javascript.internet.com/generators/popup-window.html and a geneator to make your own

2006-07-19 05:16:16 · answer #1 · answered by Paultech 7 · 7 2

I tried your code, and made a couple mods:

1. where the original code said "return false;", I wrote "return true;"
2. I added a line right after the return statement "location.href=url" .. this is in case users have a popup blocker.

3. from the link tag, I set href="" (this prevents the parent page from going to a new page)
4. from the onclick attribute, I removed "return" and just put "ccvpopup(...)".

Cheers,

Andy

2006-07-19 12:43:19 · answer #2 · answered by xx342334234234 2 · 0 0

Link

2006-07-19 12:32:26 · answer #3 · answered by rob 3 · 0 0

fedest.com, questions and answers