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="Test" method="get" action="test1.php">
<input type="text" size="3" maxlength="3" name="Quantity" onchange="window.location.replace('test.php?Quantity='+window.document.Test.Quantity.value)">
<select name="Products">
<option value="Serial">Products with Serial Number</option>
<option value="NoSerial">Products without Serial Number</option>
</select>
</form>
</body>
</html>
----------
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="Test" method="get" action="test1.php">
<input type="text" size="3" maxlength="3" name="Quantity" onchange="window.location.replace('test.php?Quantity='+window.document.Test.Quantity.value)">
<select name="Products">
<option value="Serial">Products with Serial Number</option>
<option value="NoSerial">Products without Serial Number</option>
</select>
</form>
</body>
</html>
----------