RE: could i get a clue?
| From: | Andrew Chase | Date: | Wed, 15 Aug 2001 16:44:27 +0000 |
| Subject: | RE: could i get a clue? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62868@lists.php.net to get a copy of this message | ||
No sure how you mean 'calling' the script... but in addition to using
something like
document.location='myscript.php'
It would theoretically be possible to pass javascript variables to a PHP
script in the same way by using something like
var foo = "Some Text";
var bar = "Some other text";
document.location = 'myscript.php?foo=' + foo + '&bar=' + bar;
And although it's not exactly 'calling' a script from Javascript, you can
use PHP to generate your script on the fly... handy if you need to do
something with data from a database within a Javascript. (Not sure what that
would be, but it might come in handy.)
-Andy
> -----Original Message-----
> From: Richard Lynch [mailto:ceo@l-i-e.com]
> Sent: Tuesday, August 14, 2001 8:19 PM
> To: php-general@lists.php.net
> Subject: Re: could i get a clue?
>
>
> > ok a basic question. perhaps I dont know enough about javascript but
> > anyway..
> >
> > I want to call a php script from javascript. Anybody have any hints for
> me?
> > A link to a useful website would work as well. thanks mates
>