Jump to content

Change text color on field change


gregmaze

Recommended Posts

Greetings Marcom users...

I am trying to create a template where the user can select a logo and the text will change to whatever color is associated with the logo. I have tried this on my desktop and it worked but when I uploaded it to the FP Web server it does not work.

First the code:

This is a "onrecordstart" callback rule...

if (Field("Logo").indexOf("BlueLogo.pdf") > -1)

FindTextFrame("side1").content = '<color name = "PANTONE Process Cyan C">' + FindTextFrame("side1").content;

if (Field("Logo").indexOf("GreenLogo.pdf") > -1)

FindTextFrame("side1").content = '<color name = "PANTONE 3268 C">' + FindTextFrame("side1").content;

if (Field("Logo").indexOf("PurpleLogo.pdf") > -1)

FindTextFrame("side1").content = '<color name = "PANTONE 2415 C">' + FindTextFrame("side1").content;

if (Field("Logo").indexOf("RedLogo.pdf") > -1)

FindTextFrame("side1").content = '<color name = "PANTONE 485 C">' + FindTextFrame("side1").content;

if (Field("Logo").indexOf("YellowLogo.pdf") > -1)

FindTextFrame("side1").content = '<color name = "PANTONE 137 C">' + FindTextFrame("side1").content;

 

 

if (Field("Sides").indexOf("1") > -1)

FusionPro.Composition.SetBodyPageUsage("2", false);

 

I tried the span tag at first and it worked great on my desktop, not on the server. Once I change the code from "return '<span color="PANTONE 2415 C">';

" to '<color name = "PANTONE 137 C">', it broke...

Would anyone have any good ideas on why this maybe doing this?

 

Thank you for any assistance...

Greg

Mac OS 10.11.3

FusionPro 9.3.36

Link to comment
Share on other sites

×
×
  • Create New...