From: Keary Suska <hierophant@pcisys.net>
To: Postgres-PHP <pgsql-php@postgresql.org>
Subject: Re:
Date: Sun, 16 Jun 2002 11:55:24 -0600
Message-ID: <B9322D2C.F8EB%hierophant@pcisys.net> (raw)
In-Reply-To: <20020615103712.21288.qmail@webmail16.rediffmail.com>
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"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: hierophant@pcisys.net
Subject: Re:
In-Reply-To: <B9322D2C.F8EB%hierophant@pcisys.net>
References: <20020615103712.21288.qmail@webmail16.rediffmail.com> <B9322D2C.F8EB%hierophant@pcisys.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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