Greetings again,

The RevBrowser external works great in Metacard, even as far back as 2.7.4. Nonetheless, I'm trying to pass in my own html document instead of a real web page and it doesn't respond. So, this works fine:

put revBrowserOpen(tWinID,"http://www.google.com";) into sBrowserId
      set the BrowserId of image "BrowserImage" to sBrowserId

But this doesn't:

      put "<html><p>This is an example.</p></html>" into myHtmlDoc
      put revBrowserOpen(tWinID, myHtmlDoc) into sBrowserId
      set the BrowserId of image "BrowserImage" to sBrowserId

Any ideas?

Thanks,

Ray Horsley
LinkIt! Software


On Feb 9, 2009, at 8:08 AM, Ken Ray wrote:


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: [email protected]
Web Site: http://www.sonsothunder.com/


_______________________________________________
metacard mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/metacard

_______________________________________________
metacard mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/metacard

Reply via email to