Jump to content

Ajax and PHP question...Again I post a new great problem for you the expert guys


elpaisa

Recommended Posts

Hi all!

 

I have an ajax function that calls a php function to update some html div in the page, but the div belongs to a php variable, this variable is called $content, later in the page is an html form that post this $content variable to a database, the problem is that the variable $contents that holds the html div modified by ajax is not updated with the new modifications.

 

You javascript guys can tell me how I update the variable $content with the ajax modifications, my brain will crash, I don't really know much about javascript.

 

Thxs!

but the div belongs to a php variable, this variable is called $content

 

using ajax you can update html not php the only thing javascript sees is the DOM or plain html which is the same as when you would click the "view source"

 

so you cant update a php variable what you can do is update that div you stored in that php var $content

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.