imagine you have an assoc. array that you encode with json and save in the
js var. Ok.
This way is perfect. But you can do less with this values than using my
solution. Important: Each case is different, and may be studied in
want to change its value and maintein it, must to use an static var, and
invoked (in case you want to read or write values)
And I repeat: My solution is not the best, of course, but in many cases (for
my), mantaninance of data in hidden input and using DOM for accessing it,
allow an easiest dinamic treatment of data without reload a web page. Even
more if using jQwey or Prototype.
2009/9/18 Andrea Giammarchi <an_...@hotmail.com>
> Actually, it's even more simple ... forgive me:
> that's pretty much it
> > From: an_...@hotmail.com
> > To: jonathan.desarro...@gmail.com; mail2gautambha...@gmail.com
> > CC: saeed....@gmail.com; firstname.lastname@example.org
> > Date: Fri, 18 Sep 2009 13:01:28 +0200
> > Subject: RE: [PHP] how i assign a js variable to a php variable
> > > basicly is use hidden inputs as a container for php variables, and
> > > through js.
> > really? I though the other way round was extremely simple:
> > why would you use hidden input, plus DOM to get data, etc, etc?
> > _________________________________________________________________
> > Show them the way! Add maps and directions to your party invites.
> > http://www.microsoft.com/windows/windowslive/products/events.aspx
> With Windows Live, you can organize, edit, and share your