Re: Re: jQuery to PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22 Jun 2011 at 20:56, Jim Lucas <lists@xxxxxxxxx> wrote: 

> On 22/6/2011 12:43 PM, Tim Streater wrote:
>> On 22 Jun 2011 at 19:44, Ethan Rosenberg <ethros@xxxxxxxxxxxxx> wrote:
>>
>>> I have a PHP program which will generate a chess board with a form in
>>> the program. I wish to fill the form by clicking one of the
>>> squares  in the chess board.  I am trying to use jQuery and Aja to do
>>> this.  The Ajax call works, but the value never gets into the form.
>>
>> So where is jq_test.php? And why do you seem to be referring to it both in
>> what looks like an ajax request (I've never ever looked at jquery, so I'm
>> guessing here) and also as the action of a form?

> The example script that he showed is jq_test.php   He could have left
> action=""
> and it would do the same thing.

So the OP is using the form's action to reload the page, and seemingly making an ajax call under some circumstance that will also retrieve the whole contents of the same page - and do what with it?

Anyway if you just want to get the coords of a square into a form by clicking, I'd have thought just use JavaScript. No need for ajax for that bit, IMO. Use the ajax stuff to send the move off to the chess program script, and use its reply to update the board showing the new position.

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux