Interesting suggestion. Unfortunately, the content is more dynamic them just text replacements. For example, there is a list of varying length. Also just using template for 200 lines of text doesn't seem very "tidy" to me.
On Aug 18, 3:19 am, Richard Quadling <[email protected]> wrote: > 2009/8/18 drewB <[email protected]>: > > > > > I have 200 lines of an HTML snippet that I plan to convert to > > javascript using Prototypes Elements. Instead of doing this by hand, > > I figure I could write some code that would take any block of HTML and > > convert it to javascript. Then it occurs to me that I couldn't be the > > first one to think of this. Does anyone have some code that will do > > this or know of a tool? I am looking for something like > >http://www.smelzo.it/html2js/but using Prototype Elements instead of > > basic javascript (something that uses Builder would be ok also). > > > Thanks! > > Once you've converted it to JS, what do you intend to do with it? > > If you are going to re-use it (say with different content), then maybe > the Template mechanism within Prototype [1] would be what you are > looking for. > > Richard. > > [1]http://prototypejs.org/api/template > > -- > ----- > Richard Quadling > "Standing on the shoulders of some very clever giants!" > EE :http://www.experts-exchange.com/M_248814.html > Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498&r=213474731 > ZOPA :http://uk.zopa.com/member/RQuadling --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
