0

In my post.php I use $.ajax function to load some html data from other file lets call it form.html. My question is is it possible form.html to access post.php POST/GET data when is added to the DOM of post.php ?

3
  • 1
    On page load, or when user clicks something? Commented Oct 15, 2010 at 13:40
  • 2
    what do you want to accomplish? Commented Oct 15, 2010 at 13:41
  • In post.php I make some form validations. If something is wrong post.php is reloaded again with $_POST data containing data for re-populating fields. Those fields are in form.php which is called via ajax Commented Oct 15, 2010 at 13:48

2 Answers 2

3

Why don't you use $.ajax to post to a php file, which returns html data. this way you can fill in your posted data in the html.

Sign up to request clarification or add additional context in comments.

Comments

0

I am not clear with what you are trying to do. But regardless you can still access the $_POST[] data from any DOM element on page load.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.