...

View Full Version : Passing Variable



facets
08-09-2005, 07:05 AM
Hi All,

Hoping someone can help me here..

I have a php page which is creating a form with the following content :

<form name="editSASummary" action="editSummary.php" method="post">

<select name="stockId">
<option value="670">Fasson 60# Cast Glos</option>
<option value="670">Fasson 60# Cast Glos</option>
<option value="100">Marks Stock</option>
</select>

<a href="#" onClick="window.open('editSummary.php?action=viewStock&stockId=' + document.forms.editSummary.stockId.value, null, 'windowX=10,windowY=10,width=440,height=630')">View Spec</a>

</form>

Problem is the javascript isn't paasing the stockId code to the end of the URL.
Is there something arey with the code?
I'm not getting any errors in the Javascript console.

tia, Will

glenngv
08-09-2005, 07:54 AM
<script type="text/javascript">
function createPopup(popupName){
var w = window.open("", popupName, "left=10, top=10, width=440, height=630");
w.focus();
}
</script>
...
<form name="editSASummary" action="editSummary.php" method="get" target="popup" onsubmit="createPopup(this.target)">
<input type="hidden" name="action" value="viewStock" />
<select name="stockId">
<option value="670">Fasson 60# Cast Glos</option>
<option value="670">Fasson 60# Cast Glos</option>
<option value="100">Marks Stock</option>
</select>

<input type="submit" name="btnSubmit" value="View Spec" />

</form>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum