
Server-Side vs Client-Side script
I have an application that has been entirely written using server-side
script. I need to make a change to it, but I think I will have to use
client-side script to get the desired result.
My asp pages used to allow a user to select a field from a recordset (from a
SQL2000 database) and then submit the form which would call a function that
updated the database. That was pretty simple.
Now there is a new requirement to allow the user to remove fileds from the
database as well. The way I have begun to make this change is by adding an
'Add' and 'Remove' button to the form instead of the 'Submit' button. Here
is the code I used:
<td align=center valign=middle width=10>
<input type=button value=">>" id=AddTrail name=AddTrail></input>
<input type=submit value="<<" id=RemTrail name=RemTrail></input>
</td>
Then, I renamed the update function to 'AddTrail_onClick' so that it would
be called whenever a user clicked on the Add button. This method, however,
produced no result. The database was not updated and no error message was
generated.
As I mentioned earlier, I am using server-side script. Does the 'onClick'
procedure need to be in client-side script, and if so, how do I access the
database from the client-side?
Thanks,
Dave