javascript find/delete
"andrew_d_kendrick" <[email protected]> Tue, 20 Jan 2009 15:10:21 -0000
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Message-ID | <[email protected]> |
i've just started working with clearsilver and have very little experience programming. i'm trying to make a clearsilver template that searches an HTML document "page.document.content", finds a table and deletes it each time someone looks at the page. (there may be a better way to do this, i.e. without tables) i've added an HTML table at the bottom of our documents that users add/delete certain information so that i can filter the documents based on what was added or deleted in the table. i don't want this information visible to people looking at the document, but i want it to exist on the backend so i can filter/search it. The only thing i've been able to make work is the following .cs template: backchop.cs <?cs set:backchop = string.slice(page.document.content, 0, -515) ?> <?cs var:backchop ?> The problem is that when people add/delete the wrong amount of data, backchop deletes more than just the table and screws up the HTML. Thanks - andy