ssjal Posted September 6, 2011 Share Posted September 6, 2011 hi, i am updating records from database using ajax and javascript on php page. The result is displayed inside a div (<div id="show"></div>). Now i want to assign the content of the above div(say y) to php variable for further calculations. How can i assign the value displayed in div tag to a php variable? Thanks. Quote Link to comment Share on other sites More sharing options...
WebStyles Posted September 6, 2011 Share Posted September 6, 2011 Since you're already using ajax, this should be easy for you. You can grab the content with javascript using something like: var content = document.getElementById("DIVNAME").innerHTML; then use ajax to post it to a php script for processing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.