Page 1 of 1

popup window not working

Posted: Wed Jun 16, 2004 1:57 am
by James M.
Hi, I'm just now learning javascript (after finding out that it's useful in saving bandwidth) and I was just testing this function to make a popup window but it doesnt seem to be working, and i have this other line of code [ window.status="some text"; ] that will only work when the function is not active.

heres the function by the way:

Code: Select all

function popup()
{
          testwindow=window.open
          ("url", "name","status=1, toolbar=1,
          width=300, height=200");
          testwindow.moveto(100,100);
}
and i use <a href="javascript: popup()"></a> to call it. thanks for any help ahead of time.

Posted: Wed Jun 16, 2004 2:45 am
by feyd
is that the real code?

Posted: Wed Jun 16, 2004 2:47 am
by James M.
well there is actaully a url and a name, its my first javascript function.

Posted: Wed Jun 16, 2004 2:50 am
by feyd
could you post that.. those (esp the name, can be crucial in solving a problem with window.open

Posted: Wed Jun 16, 2004 2:59 am
by James M.

Code: Select all

function login()
      &#123;
          testwindow=window.open ("http://localhost/project2/test.php", "join","status=yes, toolbar=yes,
          width=300, height=200");
          testwindow.moveto(0, 0);
      &#125;