I have a page with the following code:
<div data-role="page" id="personaldetails">
<div data-role="header">
<h1>ENTER PERSONAL DETAILS</h1>
</div><!-- /header -->
<div data-role="content">
<div data-role="fieldcontain">
<label for="name">Name:</label>
<input type="text" name="name" id="name" value="" />
<label for="name">Phone Number:</label>
<input type="text" name="phone" id="phone" value="" />
<label for="address">Address:</label>
<textarea cols="40" rows="10" name="address" id="address"></textarea>
</div>
<p><a href="#confirmscreen" data-role="button">Input Incident Details</a> </p>
</div><!-- /content -->
<div data-role="footer">
<h4></h4>
</div><!-- /footer -->
</div><!-- /page -->
And I try to do this in another page:
<div data-role="page" id="confirmscreen">
<div data-role="header">
<h1>DETAILS TO SEND</h1>
</div><!-- /header -->
<div data-role="content">
<div data-role="fieldcontain">
<script type="text/javascript">
$('<p>').html($('#phone').val()).appendTo('body');
</script>
</div>
<p><a href="http://google.com/" data-role="button">Fin</a> </p>
</div><!-- /content -->
<div data-role="footer">
<h4></h4>
</div><!-- /footer -->
</div><!-- /page -->
I'm trying to output the phone text area but I'm getting a blank space instead of the phone number I entered.
Do I need to maybe submitt he form or something to get it to work? If so how would I do it?