Re: howto pass javascript variable to php

From: Date: Mon, 18 Nov 2002 15:11:10 +0000
Subject: Re: howto pass javascript variable to php
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-124920@lists.php.net to get a copy of this message
I apologize - javascript. Jeff "Marek Kilimajer" <kilimajer@webglobe.sk> wrote in message news:3DD8FEF0.9090609@webglobe.sk... > You can still use onclick event to pass value kept in a javascript variable: > > <a href="file.php?" onclick="return action('file.php')"> > > function action(url) { > location.href='http://www.domain.net/' + url + > '&var=' + javascript_var; > return false; > } > > Jeff Bluemel wrote: > > >it's easy enough to pass php variable to javascript, but doing this the > >other way around without a form submit, or location (passing as a php $_GET > >variable) seems to be a little nightmare. it's easy enough to do it with > >the form submit, or a location command. > > > >thanks, > > > >Jeff > > > > > > > > > > >

« previous php.general (#124920) next »