0
<?php 
$x=$_POST[T1];
....
....
....
?>

<head>
<script type="text/javascript">
function submitform()
{
  document.comm.submit();
}
</script>
</head>

<form method="POST" action="" name="comm">
<p><input type="text" name="T1" size="20"> <a href="javascript: submitform()">
Submit</a></p>
</form>

What i need is on clicking the submit link, the current popup or page should be closed.
But it must not close before the form data is posted.I mean....The data is posted on the form itself and after executing the php code on the top, the popup or page should close. Any suggestions or help will be greately appreciated.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by hielo
0

try:

function submitform()
{
document.comm.submit();
setTimeout(function(){self.close();}, 50);
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.