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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.