From: "CHAN YICK WAI" <[EMAIL PROTECTED]>
> How about if this $student is actually a text field, when this html
> generated by php script, it has no value, so the onClick line is
> ...url?student=<$student without value>, when I click, it reads nothing,
how
> should I do?
Javascript.
---John Hol
Actually, I just did this last night with great success. Here is my
code, I'm sure you can adapt it to your own. PHP was not needed, this
was all done as part of the client-side validation JavaScript. Use
JavaScript in the submit button's onClick to set the JavaScript
variable with the valu
n W. Holmes" <[EMAIL PROTECTED]>
To: "CHAN YICK WAI" <[EMAIL PROTECTED]>; <>
Sent: Thursday, August 05, 2004 11:06 PM
Subject: Re: [PHP] How pass form variable to window.open()
> From: "CHAN YICK WAI" <[EMAIL PROTECTED]>
>
> > in the
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
[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
and http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
From: "CHAN YICK WAI" <[EMAIL PROTECTED]>
> in the form, for example, i have
>
> and
> It seems to me not working.
Define "not working" because that's how you do it. Well, actually, you need
to echo $student, unless this whole thing is already in an echo
---John Holmes...
--
PHP General
Hi,
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
and http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
7 matches
Mail list logo