php variables in javascript
Posted: Thu Mar 24, 2005 12:17 am
i am trying to open a new window on hitting submit but with passing variables with the form that has the submit button. i believe this would consist of javascipt with some php maybe but how would i submit the varialbes in the form with the outside javascript. here is the code i have now.
but this dosnt work.
Code: Select all
<SCRIPT LANGUAGE="e;javascript"e;>
<!--
window.open ('view_cart.php?action.php?action=add_item', 'newwindow', config='height=100,
width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,
location=no, directories=no, status=no')
-->
</SCRIPT>
<form action="e;view_cart.php?action=add_item"e; method="e;post"e;>
<img src="e;img/Stencils/mazdaspeedstencils.jpg"e; width="e;491"e; height="e;45"e;><br>
Price: $2.50<br>
<input type="e;hidden"e; name="e;itemName"e; value="e;MazdaSpeed Caliper Decal/Stencil"e;>
<input type="e;hidden"e; name="e;itemPrice"e; value="e;2.50"e;>
<input type="e;submit"e; name="e;submit"e; value="e;Add To Cart"e; onClick="e;window.open();"e;>
</form>