I am still VERY new to JavaScript, so I will do the best at explaining what I am trying to do here...
I have a database table where I store a bunch of invoices. I am now trying to make a front end to run queries. I don't know how to make it so i can keep adding AND/OR statements to my query as need be. Also, I need a way to eliminate the FIRST AND/OR drop down list because obviously your first query statement will not start with an AND or OR.
Here is my basic html code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Invoice Query</title>
</head>
<body>
<form method="post" action="" enctype="multipart/form-data">
<table align="center" border="0" id="qry_table">
<tr>
<td><select name="andor"><option value="" selected></option>
<option value="AND">AND</option>
<option value="OR">OR</option>
</select>
</td>
<td><select name="column"><option value="" selected></option>
<option value="inv_num">Invoice Number</option>
<option value="inv_date">Invoice Date</option>
<option value="vendor">Vendor</option>
<option value="purpose">Purpose</option>
<option value="amount">Amount</option>
</select>
</td>
<td><select name="what"><option value="" selected></option>
<option value="=">=</option>
<option value=">">></option>
<option value="<"><</option>
<option value=">=">>=</option>
<option value="<="><=</option>
<option value="LIKE">LIKE</option>
</select>
</td>
<td><input type="text" name="qry_term" /></td>
</tr>
<tr>
<td colspan="4"><input type="submit" value="Submit Query" name="submit" /></td>
</tr>
</table>
</form>
</body>
</html>
I'm just not good enough with javascript to know how to add/remove rows if needed, but i am very willing and still trying to learn. Any help is much appreciated!