i am using this code to get submitted data from a form
<input id="name" name="name" type="text" class="auto-style8" style="width: 70%" />
<button id="singlebutton" name="singlebutton" class="btn btn-primary" onclick="return submit();">Submit</button>
<div id="info"></div>
<script type="text/javascript">
function submit()
{
var name = document.getElementById("name").value;
document.getElementById("info").innerHTML = " My Name is "+name+" ";
return false;
}
</script>
the result is displayed in the same window as that of form. i want to display the output in a popup window and be able to link a print button in the main window that once clicked will print the contents of that popup
edit: just to clarify more.
form submitted > open a new window > displays the entered results
thanks