|
Posted by Jet Loong Tang on 12/28/05 22:48
Hello,
i have a small webapplication where there is a table with a large number of
rows - each having a checkbox. User can mark or unmark a checkbox.
Now when this form is sent, I must deal with the new marked and the unmarked
lines.
insert the new marked into a database and
delete the unmarked one from the database.
There is a trivial solution to compare the send information from the form
with the database
those which are not in the database must be new one and those that should be
in the database which are not listed must be deleted.
But I want to know whether there is a more efficient method, cos when the
user is actually clicking and changing the information is already there,
right ?! But I'm not allowed to use javascript -
Are there more HTML Tricks or sth. which I can use?
I have tried so far :
normally:
e.g.
<input type="checkbox" name="feed" value="cat">
extended:
<input type="checkbox" name="feed" value="cat #checked#">
or
<input type="checkbox" name="feed" value="dog ##">
#checked# will be added when it's already in the database otherwise ##
(## then means that it's available but not yet in the database)
but since I get the information : "feed=dog ##" I know thats a new one which
must be added to the database.
and also doesnt need to check for 'cat'
I hope somebody can understand what i mean..
But I have no idea how to get the other information to delete which one.
Thanks
-------------------------------------------
Regards JetLoong Tang jetloong@t-online.de
Navigation:
[Reply to this message]
|