PHP is server side, Javascript is client side.  Your Javascript is
executing on your local machine, on the result of the PHP output.

In your example when the PHP script in the <div id="loading"> is
executed, the $pass variable is 2.  So, the HTML output (where the
Javascript executes) will only ever have "Loading...2".

Your options are to either update the content of your div with
Javascript, or to generate two divs each with their own content (the
latter is simpler).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to