Unless student is set somewhere else that wont work.. you need the form
to submit before the text field 'student' sets a var named student. 
One way to do such, without all the window formating is to just submit
the form to the page you want. and target=_new in the form tag.  

other than that, you must use javascript to grab the data from the
textfield, then use window.open() ..create  a javascript method called
openwin or something that gets called OnClick on your button.

function openWin() {
   student = document.Form.Student.value;
   win = open('yourpage.html?student=' + student, 'Title',
'width=45,height=34');
    win.focus();
}

"Jay Blanchard" <[EMAIL PROTECTED]> wrote: 
> 
> [snip]
> Anyone can tell if, inside php script, I can pass form variable to the
> javascript window.open() call?
> 
> That is,
> 
> in the form, for example, i have <input type=text.. name=student ...>
> 
> and <input type=button onClick=window.open('url?student=$student', ....)
> 
> It seems to me not working.
> [/snip]
> 
> You have to echo or print the sJavaScript statement with PHP, 
> 
> print("<input type=\"button\"
> onClick=\"window.open('url?student=$student', ....)
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to