Re:

From: Keary Suska <hierophant(at)pcisys(dot)net>
To: Postgres-PHP <pgsql-php(at)postgresql(dot)org>
Subject: Re:
Date: 2002-06-16 17:55:24
Message-ID: B9322D2C.F8EB%hierophant@pcisys.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

on 6/15/02 4:37 AM, dharm_shankar(at)rediffmail(dot)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"

In response to

  • Re: at 2002-06-15 10:37:12 from dharm shankar

Responses

  • Re: at 2002-06-16 22:52:21 from Chris

Browse pgsql-php by date

  From Date Subject
Next Message Chris 2002-06-16 22:52:21 Re:
Previous Message dharm shankar 2002-06-15 10:37:12 Re: