Hi. I’m fairly new to javascript and am trying to create a script to maintain a member directory. The script must be able to add members and delete members. First, I’m trying to create the addmem() function and am having trouble. I can’t figure out how to pull information from the input from the form. It’s as if nothing was entered. I’m sure it’s something simple (as I’m new to this) and would appreciate any help. Here’s my html code
[code=html]<form action=”sample.html” method=”get”>
<table border=”1″ id=”tabledir”>
<tr>
<td colspan=”5″ id=”center”><p id=”pdata”>Member Directory</p></td>
</tr>
<tr>
<td> </td>
<td><p id=”pdata”>First Name</p></td>
<td><p id=”pdata”>Last Name</p></td>
<td><p id=”pdata”>Address</p></td>
<td><p id=”pdata”>Number</p></td>
</tr>
<tr>
<td><input type=”button” value=”Add Member” onclick=”addmem()”></td>
<td><input type=”text” name=”txtRow1″></td>
<td><input type=”text” name=”txtRow2″></td>
<td><input type=”text” name=”txtRow3″></td>
<td><input type=”text” name=”txtRow4″></td>
</tr>
<tr style=”font-size: 10px”>
<td style=”border: 0″> </td>
<td width=”160px” style=”border: 0″> </td><td width=”160px” style=”border: 0″> </td>
<td width=”160px” style=”border: 0″> </td><td width=”160px” style=”border: 0″> </td>
</tr>
<tr>
<td id=”center”><input type=”button” value=”x” onclick=”add()”></td>
<td><p id=”pdata”>Joe</p></td>
<td><p id=”pdata”>Smith</p></td>
<td><p id=”pdata”>1234 Street</p></td>
<td><p id=”pdata”>(123) 456-7890</p></td>
</tr>
</table>
</form>
the javascript can be found here
[URL=”http://techjoshonline.com/jim/database.js”]http://techjoshonline.com/jim/database.js
Thanks in advance for any help