Reply to Re: Getting values from the Javascript namespace

Your name:

Reply:


Posted by Jasper Bryant-Greene on 03/28/05 01:20

Daniel Lahey wrote:
> Is there any way to get values from the Javascript namespace into PHP?
> I want to use a value passed into a Javascript function in a query
> within some PHP code in the function which is used to dynamically
> populate a select's options.
>
> TIA

JavaScript is parsed on the client side, and PHP on the server side.
Because HTTP is stateless, you'd have to call the server again from the
JavaScript, as the JavaScript isn't parsed until after the request is
complete.

You might like to investigate the XMLHTTP object for calling the server
from JavaScript, but it might be better to figure out an alternative way
to do it without requiring the second call back to the server. I can't
really help any more without more specifics (maybe some code).

HTH
--
Jasper Bryant-Greene
Cabbage Promotions
www: www.cabbage.co.nz
email: jasper@cabbage.co.nz
phone: 021 232 3303

public key: Jasper Bryant-Greene <jasper@cabbage.co.nz> keyID 0E6CDFC5
fingerprint: 2313 5641 F8F6 5606 8844 49C0 1D6B 2924 0E6C DFC5

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация