<form id="History" method="post" action="./php_lib/getHistoryProcess.php">
                        			<button name="clearTableButton" type="submit" value="table2">Table 2 Orders</button>     
                    			</form>

the code above will process through the getHistoryProcess.php and return the result in the same page (the white blank page). I would really like the result pop up like ***** href=" " target="blank" style*****
in other words, i want the result in a new window or tab in small size.

Is it possible to do something like that?

Recommended Answers

All 4 Replies

You need to edit it at HTML level. You can try:

<form id="History" method="post" action="./php_lib/getHistoryProcess.php" target="_blank">
    <button name="clearTableButton" type="submit" value="table2">Table 2 Orders</button>     
</form>

thanks myhfelix, I actually did that already. ideally i want it pop up in a smaller window like if i could set the size. i think javascript is able to do it.. but mixing js with php in the button tag i don't know.

Member Avatar for rajarajan2017
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script language="javascript">
function open_win(url_add)
   {
   window.open(url_add,'welcome','width=300,height=200,menubar=yes,status=yes,location=yes,toolbar=yes,scrollbars=yes');
   }
</script>
</head>
<body>
 <form name="History" method="post">
	<input type="submit" name="clearTableButton" value="table2" onClick="open_win('sample.htm')"/>
 </form>
</body>
</html>

Passing the path you want instead of sample.htm.

wow, haven't tried yet but looks like it will definitely work. thanks much for the solid code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.