Jump to content

Turn on/off Text Frames


Recommended Posts

I am so not a java script guy. I have mad respect for all you guys/gals that post in here. Its been a great help to me. Just thought I'd start there. :) Up to this point, I have been extremely lucky, but Im stuck... here goes.


I have 2 text frames on a page. In my data I have a field "affiliate". It has an "A" or "NA" as a value. I want to suppress one of the text frames and leave one visible based upon those values. Jeeeeze. It sounds simple...and Im sure it probably is.






Link to comment
Share on other sites

You need to give your text frames unique names in your template. Then you can have the following code in an OnRecordStart callback rule:

if (Field("affiliate") == "A") FindTextFrame("NA Text Frame Name").suppress = true;
else FindTextFrame("A Text Frame Name").suppress = true;

I believe it was in version 6.0 that this method first became available.


JavaScript isn't too difficult to learn, especially in a FusionPro context. Also, you should try searching for what you need to do on the forums. Most of the things you need to do on a day-to-day basis have already been asked and you would only need to modify the pre-supplied code to fit your field/frame names. Good luck!

Link to comment
Share on other sites

esmith thank you! works perfectly.


I searched the forum yesterday and found the FindTextFrame code, and another post suggested the OnRecordStart callback, I just couldn't put it all together. Im such a noob, and know just enough to be dangerous. Thanks so much for the help and advice.


I am really enjoying this after doing PrePress for the last 14 years.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...