Re: Why Doesn't My Javascript Work With PHP?
| From: | Jason Cox | Date: | Tue, 22 Aug 2000 20:55:12 +0000 |
| Subject: | Re: Why Doesn't My Javascript Work With PHP? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13013@lists.php.net to get a copy of this message | ||
You should remember that PHP couldn't care less about JavaScript. JavaScript
is executed client side. Php is long gone by the time JavaScript goes into
action. Post your code and maybe we can figure it out. Also, view source on
the page that's messed up and look at the JavaScript.
Jason
On Tue, 22 Aug 2000, you wrote:
> Hi;
>
> I have a Javascript that worked perfectly well on another server, *then* I
> built my own server. I have other PHP/MySQL scripts that work perfectly
> well on my new server. But for some reason, a certain Javascript, nested
> within a *while* statement acts crazy.
>
> What I want to occur is to generate information about specific horses
> selected by search criteria. The script correctly prints to screen the name
> of the horse. This is surrounded by an anchor tag. I can pass the correct
> information about the specific horse through the tag to the new page
> *without* Javascript, but when I use the Javascript, what happens is the
> information that is supposed to be passed with the anchor for each horse is
> replaced with new information each time the *while* statement is executed.
> The result is that all the *names* of the horses print to screen correctly,
> but when you click on one, it pulls up the information for the last horse
> on the list!
>
> To make matters worse, the page with the list of horses names is
> intentionally small, but the page I generate for the specific horses must
> be full-sized. I cannot do this with a *target="_blank"* line of code: I
> have to use Javascript.
>
> What am I doing wrong?
> TIA,
> BenO
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net