My jQuery mobile slide out dialog box is experiencing an issue. The first time the slide out occurs, a comment box appears where users can enter comments and then submit them, followed by a "THANK YOU" message.
However, when the user closes the dialog box and slides it out again for the second time, the "THANK YOU" message remains instead of generating a fresh comment box.
Even if a user enters text in the comment box without submitting it and goes back, the next slide out dialog box still displays the previously entered text!
I would greatly appreciate any assistance with this problem.
Below is the HTML code:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css">
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
</head>
<body>
<div data-role="page" id="pageone">
<div data-role="header">
<h1>Welcome To My Homepage</h1>
</div>
<div data-role="main" class="ui-content">
<p>Click on the link to see the slide effect.</p>
<a href="#pagetwo" data-transition="slide">Slide to Dialog Page</a>
</div>
<div data-role="footer">
<h1>Footer Text</h1>
</div>
</div>
<div data-role="page" data-dialog="true" id="pagetwo">
<div data-role="header">
<h1>Thank You!</h1>
</div>
<div data-role="main" class="ui-content">
<form action="thankyou.asp" autocomplete="on">
Comment:<input type="text" name="comment"><br>
<input type="submit" value="Submit">
</form>
<a href="#pageone">Go Back</a>
</div>
</div>
</body>
</html>