Re: OT-Javascript Question
| From: | Jake McHenry | Date: | Thu, 06 Nov 2003 21:36:08 +0000 |
| Subject: | Re: OT-Javascript Question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-168779@lists.php.net to get a copy of this message | ||
I got everything working now. For some reason when I put it inside php, it
wouldn't work with my variables with the numbers in front
(1_Accounting_Unit) so I renamed all of them with the number at the end and
they work fine.
Jake
----- Original Message -----
From: "Chuck Vose" <chuck@dork.com>
To: "Jake McHenry" <linux@nittanytravel.com>
Sent: Thursday, November 06, 2003 3:30 PM
Subject: Re: [PHP] OT-Javascript Question
> You're fine to echo the whole thing, but remember that php happens
> before the page is ever created (server side as opposed to client side)
> whereas javascript happens after the page is finished loading on the
> client computer. So the javascript can't run in the middle of a php
> script because the php is being loaded on the server.
> Chris has it right, you just have to plan on php inputting variable and
> the like by embedding <?php ?> tags inside the javascript statements,
> without the echo's. If you want to keep your echo's you may be having a
> problem with ' and " s. Quotes unfortunately have meaning in both php
> and javascript so you may have to pass the javascript quotes in with a \
> in front so the php's echo doesn't interpret them as an escape into
> phpland. (by which I mean using \" and \' inside the echo's)
>
> Hope this helps you a little.
> Love,
> Chuck Vose
>