Hi all,

I'm trying to open a window via a function, and yes, I won't work ;P. Can ynyone help me ?

Thanx in advance

Olli

here's the code:

function openWin ($modelnames)
{
print" javascript:window.open('sendresponse.php?sendnames=$modelnames','large','width=300,height=200','scrollbars=no','resizable=no')";
}

if ($pushed == 1)
{
openWin ($names);
}

    print "window.open('sendresponse.php?sendnames=$modelname','large','width=500,height=300','scrollbars=no','resizable=no')";

    doesn't work. I'll be printed on the screen. Any Ideas ?

      Think of coding it all in flat HTML first...

      <script janguage="javascript" type="text/javascript">
      function openWin(modelname)
      {
          window.open("sendresponse.php?sendnames="+modelname);
      }
      </script>
      

      Would work...

      Now depending on what you want to do, you will need to work the PHP around it.

      You could echo it all out, but using $foo in place of the modelname might cause you some problems, is this the result of a use mouse click - or an onLoad function ?

        I have a image button on top of the script and I need to check if a certain value is set before opening the window. So áfter all it's caused by a click on an image

          Write a Reply...