Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form QUestion.

Status
Not open for further replies.

arios2mx

Technical User
Dec 23, 2002
60
MX
Hi!
I am populating a Mysql database with several products, some of the have a serial number and some of them don't.

So I wanted to:
1.Use a text box to indicate the quantity of products.
2.If I selected Products with serial Number then in the same page should appear as much input text boxes as they are needed to insert a serial number per text box.
3.Use the lowest quantity of web pages

My problems are:
OnChange is working, Why "Quantity" value doesn't appear
I think my problem resides on OnChange parameters like "window.document....." I have tried to find information about this topic without luck, Where can I find it?
If you tried the following code OnChange works only the first time you insert a value on the text box, the second time it doesn't.

Could I be able to do this on PHP?
--Up to now I AM NOT using PHP I am going to use it to process and calculate the data. This is the only way that I find to "update" a webpage.
Is there a way to do this with PHP?

Thanks in Advance

Alex

--Code snip-
<html>
<head><title></title></head>
<body>
<form name=&quot;Test&quot; method=&quot;get&quot; action=&quot;test1.php&quot;>
<input type=&quot;text&quot; size=&quot;3&quot; maxlength=&quot;3&quot; name=&quot;Quantity&quot; onchange=&quot;window.location.replace('test.php?Quantity='+window.document.Test.Quantity.value)&quot;>
<select name=&quot;Products&quot;>
<option value=&quot;Serial&quot;>Products with Serial Number</option>
<option value=&quot;NoSerial&quot;>Products without Serial Number</option>
</select>
</form>
</body>
</html>
----------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top