pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedRe:
3+ messages / 3 participants
[nested] [flat]
* Re:
@ 2002-06-15 10:37 dharm shankar <dharm_shankar@rediffmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: dharm shankar @ 2002-06-15 10:37 UTC (permalink / raw)
To: Andrew McMillan <andrew@catalyst.net.nz>; +Cc: pgsql-php; mfischer@josefine.ben.tuwien.ac.at; mfork@toledolink.com
Hi
Sorry.But again i describe what i want.I want to receive(In php
code because i want to use this value in sql statement.) value of
the variable l2 Within script tag.
<script>
function ch(list)
{
var l2;
l2=list.option.text;
//i want to send the value of l2 in php file/code.
}
</script>
<html>
<select name="dd" onChange="ch(this);">
<option>dd</option>
<option>www</option>
<option>ww</option>
<option>dsfd</option>
</select>
</html>
If u have solution then send me as soon as possible.Also tell me
is any method in php for event handle.
dharm.
_________________________________________________________
Click below to visit monsterindia.com and there is always a
better job for you at http://monsterindia.rediff.com/jobs
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re:
@ 2002-06-16 17:55 Keary Suska <hierophant@pcisys.net>
parent: dharm shankar <dharm_shankar@rediffmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Keary Suska @ 2002-06-16 17:55 UTC (permalink / raw)
To: pgsql-php
on 6/15/02 4:37 AM, dharm_shankar@rediffmail.com purportedly said:
> Hi
>
> Sorry.But again i describe what i want.I want to receive(In php
> code because i want to use this value in sql statement.) value of
> the variable l2 Within script tag.
>
> <script>
>
> function ch(list)
> {
> var l2;
> l2=list.option.text;
> //i want to send the value of l2 in php file/code.
> }
> </script>
>
> <html>
> <select name="dd" onChange="ch(this);">
> <option>dd</option>
> <option>www</option>
> <option>ww</option>
> <option>dsfd</option>
> </select>
> </html>
> If u have solution then send me as soon as possible.Also tell me
> is any method in php for event handle.
> dharm.
PHP is a server-side only scripting language, so JavaScript and PHP cannot
interact except by making calls to the server. So you would either need to
enclose the <SELECT> in a <FORM>, with onChange="submit();", or call
submit() in ch(), or make a simple GET request: location.href='/url?dd=' +
l2 in ch().
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re:
@ 2002-06-16 22:52 Chris <csmith@squiz.net>
parent: dharm shankar <dharm_shankar@rediffmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Chris @ 2002-06-16 22:52 UTC (permalink / raw)
To: pgsql-php
> > Hi
> >
> > Sorry.But again i describe what i want.I want to receive(In php
> > code because i want to use this value in sql statement.) value of
> > the variable l2 Within script tag.
> >
> > <script>
> >
> > function ch(list)
> > {
> > var l2;
> > l2=list.option.text;
> > //i want to send the value of l2 in php file/code.
> > }
> > </script>
> >
> > <html>
> > <select name="dd" OnChange="ch(this);">
> > <option>dd</option>
> > <option>www</option>
> > <option>ww</option>
> > <option>dsfd</option>
> > </select>
> > </html>
> > If u have solution then send me as soon as possible.Also tell me
> > is any method in php for event handle.
> > dharm.
>
>PHP is a server-side only scripting language, so JavaScript and PHP cannot
>interact except by making calls to the server. So you would either need to
>enclose the <SELECT> in a <FORM>, with OnChange="submit();", or call
>submit() in ch(), or make a simple GET request: location.href='/url?dd=' +
>l2 in ch().
>
>Keary Suska
>Esoteritech, Inc.
>"Leveraging Open Source for a better Internet"
and you also need a value for the options. like this: <option
value="dd">dd</option> otherwise the form will return nothing.
-----------------
Chris Smith
http://www.squiz.net/
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-06-16 22:52 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-15 10:37 Re: dharm shankar <dharm_shankar@rediffmail.com>
2002-06-16 17:55 ` Keary Suska <hierophant@pcisys.net>
2002-06-16 22:52 ` Chris <csmith@squiz.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox