logo

New Response

« Return to the main article

You are replying to:

  1. Hi Jake,

    After reading your article, i thought of a solution that might work for your database.

    What you need to do is to create a seperate RichText fields for each entry made. (e.g. Body_1, Body_2, Body_3, etc....).

    All these fields will be combined into your Body field. This will be used for Searching and Displaying. Each entry in the Body field will be within a unique DIV, that is given an ID

    (e.g. <div id="Body_1">......</div> <div id="Body_2">......</div> . . <div id="Body_X">......</div>)

    When you put the document in Edit Mode you can loop through the content (i.e. 1 to X) and look for the ID (i.e. Body_1 to Body_X).

    You can then replace the text found with your usual buttons (i.e. Edit, Delete, etc...). Because each Button knows it's own index, you can then open the document and edit the corresponding field.

    This can be made more intelligent, by recording the User who made the entry in a corresponding User Index field (i.e. Body_1 = User_1, etc...). Then only the author of the entry can edit, delete, etc...

    When a users deletes an entry, your WQS agent can remove the Index field, renumber the subsequent fields (e.g. 2 => 1, 3 => 2, etc...), and then rebuild the Body field.

    I know that this is a little bit rough, but i think it can be done and would not require any Javascript. Should be easy enough to implement in your code!

    Later

    Patrick

    (P.S. All comments are welcome!)

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: