I am working on a simple web page that includes an iframe. Within this iframe, there are three input fields that users need to fill in. I am looking for a way to retrieve the data entered by the user in each of these input fields using JavaScript.
Below is the JavaScript code snippet:
<script type="text/javascript"> var ticket = window.frames[0].document.getElementById('ticket').ticket; alert(ticket); </script>
Inside the iframe, I have the following input field:
<input type='text' name='ticket' id='ticket'...
Despite entering data into all 3 input fields and clicking 'ok', nothing seems to happen. I am now wondering how I can save the data entered in these input fields to a .txt file so that I can later retrieve this text using PHP and store it in a database.