pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
(no subject)
2+ messages / 2 participants
[nested] [flat]

* (no subject)
@ 2002-06-14 07:30 dharm shankar <dharm_shankar@rediffmail.com>
  2002-06-15 02:18 ` Re: Andrew McMillan <andrew@catalyst.net.nz>
  0 siblings, 1 reply; 2+ messages in thread

From: dharm shankar @ 2002-06-14 07:30 UTC (permalink / raw)
  To: pgsql-php; mfischer@josefine.ben.tuwien.ac.at; mfork@toledolink.com

Hi

    i want to use javascript variable in my php code.look on that 
code.

  <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>

pls send me solution as well as possible.

dharm
"Richie" <dugganr@student.cs.ucc.ie>

_________________________________________________________
Click below to visit monsterindia.com and review jobs in India or 
Abroad
http://monsterindia.rediff.com/jobs




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re:
  2002-06-14 07:30 (no subject) dharm shankar <dharm_shankar@rediffmail.com>
@ 2002-06-15 02:18 ` Andrew McMillan <andrew@catalyst.net.nz>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew McMillan @ 2002-06-15 02:18 UTC (permalink / raw)
  To: dharm shankar <dharm_shankar@rediffmail.com>; +Cc: pgsql-php; mfischer@josefine.ben.tuwien.ac.at; mfork@toledolink.com

On Fri, 2002-06-14 at 19:30, dharm shankar wrote:
> Hi
> 
>     i want to use javascript variable in my php code.look on that 
> code.

Hi,

Your request is not clear.  Do you want to include the value of a PHP
variable within your javascript?

Just use the <?php echo $myvar; ?> in the middle of your javascript and
print it.

Do you want to get the value from your javascript code and do something
with in your PHP?  This is much harder.  Remember, the javascript is
executing on a different computer, and will only commence execution once
the whole of the page is loaded.  You probably need to make your
javascript to a request to a PHP page which includes the variable URL
encoded.

Regards,
					Andrew.
> 
>   <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>
> 
> pls send me solution as well as possible.
> 
> dharm
> "Richie" <dugganr@student.cs.ucc.ie>
> 
> _________________________________________________________
> Click below to visit monsterindia.com and review jobs in India or 
> Abroad
> http://monsterindia.rediff.com/jobs
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 
-- 
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/        PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201    MOB: +64(21)635-694    OFFICE: +64(4)499-2267
       Are you enrolled at http://schoolreunions.co.nz/ yet?




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-06-15 02:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-14 07:30  dharm shankar <dharm_shankar@rediffmail.com>
2002-06-15 02:18 ` Re: Andrew McMillan <andrew@catalyst.net.nz>

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