Forum Moderators: open
<form action="mycart.php?id=<?php echo $id;?>" method="post" >
<input type="text" value="" name="ch_qty" size="3" >
<input type="text" value="" name="y_qty" size="3" >
<input type="image" value="submit" name="submit" src="images/addtocart.jpg" align="right" border="0" height="20" >
this form is submittiong values to mycart.php but I want to open mycart.php as popup window.
How I can do this?
Regards,
Rabia
It's something written really fast so I assume you'll have to modify it a bit:
<script type="text/javascript">
function popup(x,y){
url = 'http://the.page.you.want.to.pop.up.com/?ch_qty='+x+'&y_qty='+y+'&cahebust='+Math.random()
window.open(url, 'WindowName', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=400');}
</script>
<form action="mycart.php?id=<?php echo $id;?>" method="post" >
<input type="text" value="" name="ch_qty" id="ch_qty" size="3" >
<input type="text" value="" name="y_qty" id="y_qty" size="3" >
<input type="button" value="Submit" onclick="popup(document.GetElementById('ch_qty').value,document.GetElementById('y_qty').value)" >