Much like how jquery keeps the javascript out of the HTML, it's so
much cleaner to keep PHP out of the HTML as well.

Have a look at the Smarty templating system for PHP. It's awesome.

-j

On Mar 4, 11:20 am, charlie <[EMAIL PROTECTED]> wrote:
> Hi all, the application I'm attempting to write couldn't be simpler:
> I want to display rows of data, retrieved from a database and allow
> people to edit or delete those rows and add new rows.  Backend is PHP,
> but I'd prefer to keep that out of the picture.  So far I'm passing my
> rows successfully to jquery and have the loop ready to go, but I'm not
> sure how to proceed.
>
> Here's my dilemma:  what's the best strategy for keeping the HTML out
> of my Javascript as much as possible?  The whole point of this
> excercise has been to try to extricate as much PHP as possible from
> the display logic, but just subbing in javascript is obviously pretty
> pointless.
>
> One strategy I'm toying with is having an HTML "empty row" in the
> normal layout that's hidden and get's cloned for both existing and new
> records.  Is this a common technique?  Are there better ones?  I'm
> trying not to re-invent the wheel here!
>
> TIA, Charles

Reply via email to