Re: - Mailing list pgsql-php

From Chris
Subject Re:
Date
Msg-id 5.1.0.14.0.20020617085036.03679720@cooee.cybersydney.com.au
Whole thread Raw
In response to Re:  (Keary Suska <hierophant@pcisys.net>)
List 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/


pgsql-php by date:

Previous
From: Keary Suska
Date:
Subject: Re:
Next
From: Joseph Syjuco
Date:
Subject: Getting array variables from my postgresql function