> Anyone with any ideas on how to use <span> tags when setting the > htmlText of a fld? Example: > > <html> > <head> > <style type="text/css"> > span.blue {color:lightskyblue;font-weight:bold} > span.green {color:darkolivegreen;font-weight:bold} > </style> > </head> > <body> > <p>My mother has <span class="blue">light blue</span> eyes and my > father has <span class="green">dark green</span> eyes.</p> > </body> > </html> > > This works fine in any browser, but setting the htmlText of a fld > ignores the <span> tags.
Sorry, Ray... the htmlText of a field only has limited HTML support, and <span> tags aren't one of them, nor is any CSS. You'd have to replace your <span> tags with old-style <font> tags in order to get what you want, so you could do something like this (assuming field 1 contains the actual HTML and you want to render it into field 2): -- watch line wraps on mouseUp put fld 1 into tData put replaceText(tData,"<style.*/style>","") into tData replace format("<span class=\"blue\">") with format("<font color=\"lightblue\"><b>") in tData replace format("<span class=\"green\">") with format("<font color=\"darkolivegreen\"><b>") in tData replace "</span>" with "</b></font>" in tData set the htmlText of fld 2 to tData end mouseUp HTH, Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ _______________________________________________ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard