Hi,
I have written a javascript which accepts input from the user, fills a form, and submits the data to a PHP script for processing. The PHP script generates an XML file(the XML representation of the form that he filled in). Once the XML file is generated, I want to present the user the form he just filled in (so, I want to reload the original HTML page) by clicking a button. My javascript is capable of reading in the generated XML file to fill the form, and I ideally want to perform this function when the user clicks on the button. Is there a way to do this from the PHP script? My javascript and PHP script are in two different files.
<html>
<header>
<script>
function genXmlFile() {
//create a form and submit using POST operation
}
function loadXmlFile() {
// opens the xml file and fills in the form
}
</script>
</header>
<body>
<div>
<input type="text" name="ModName" />
<input type="button" name="GenButton" value="Gen Xml File" onclick="genXmlFile" />
</div>
</body>
</html>
PHP script:
<?php
// create the XML file
// post a button to the page which when clicked, will take the
// user back to the from above by calling the loadXmlFile()
// function.
?>
<html>
<body>
<INPUT type="button" id="EditData" value="Edit Data" onclick=?? />
</body>
</html>