Why Doesn't My Javascript Work With PHP?

by Ben Ocean <beno(at)cnw.com>

 Date:  Tue, 22 Aug 2000 12:31:47 -0700
 To:  php-general(at)lists.php.net
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
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

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA