marcusm Posted November 9, 2010 Posted November 9, 2010 Is it possible to combine a text and graphic rule in the same rule? Depending on which choice a user makes I want a certain text and graphic to show up in one case and certian text (+color) and graphic on the other choice. Do I have to work with tagged text to get this to work? Im a newbie when it comes to Javascript so an easy example would have been great.
Alex Marshall Posted November 9, 2010 Posted November 9, 2010 This is called an inline graphic. Please refer to the section titled "Graphic Tag Inside Story Tag" in the Rules Guide. In a JavaScript text rule, you can do something like this for the graphic rule: return '<graphic file="logo.eps">';
esmith Posted November 15, 2010 Posted November 15, 2010 If you are trying to get by with "one rule" that returns a graphic in a graphic frame and some text in a separate text frame (as opposed to a graphic that occurs inline with the text as Alex describes above), you can create a function in your JavaScript Globals one time and then call to it from two separate rules so that you don't have to duplicate your code for both purposes. If you are a newbie to JS, this may be a bit confusing, but explaining in better detail what you want might make it easier for us to give a more specific solution.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.