Jump to content

Search the Community

Showing results for tags 'switch statement'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome
    • Start Here!
    • News
  • Software-Related Talk
    • Documentation
    • Getting Started
    • The JavaScript Library
    • FusionPro® VDP Creator
    • FusionPro® VDP Producer
    • FusionPro® VDP Server (API)
    • FusionPro® Expression®
    • MarcomCentral®
  • Support
    • Issues, Questions, Etc.
    • Digital Workflow Documents
    • Fonts
  • Off Topic
    • Customer Polls
    • Job Board (Moderated)
    • Reviews, Rants, and General Musings

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Location


Occupation


FusionPro VDP software version


OS


Acrobat Version


Homepage


ICQ


AIM


Yahoo


MSN


Skype


User Title

Found 2 results

  1. Hi there I need some serious help. I have been asked to template business cards in Digital StoreFront using Fusion Pro. I have attached a sample of the business card for reference. There is a standard English side of the business cards and or user can also have English and Mandarin or English and Japanese or English and Korean cards as an option. I would like some help in templating this in fusion pro as i have no clue about javascript. I was potentially thinking of using the switch rule where user can just have single sided English cards or any other language with English. I am open to suggestion if there is a clever and easier what of templating this. Can someone please help in template this. Thanks in advance Naval Weird Wild Wonderful BC.pdf
  2. Wanted to create a function that allows users to choose a style from Field A that formats the text they enter in Field B. I came up with the following function which appears to work pretty well. My problem arrises when I come to the "Bullets" case I need bulleted text to have a tab stop of .125 in and a second line indent of 0p9. Is there a way to include this in the switch statement so that it doesn't effect all the other fields in the text frame? function styleText(style,text){ titleFormat = '<color name="NSU green"><f name ="Interstate Black"><z newsize="28">'; subtitleFormat = '<color name="NSU green"><f name ="Interstate RegularCondensed"><z newsize="20">'; headFormat = '<color name="NSU green"><f name ="Interstate BlackCondensed"><z newsize="16"><uppercase>'; subheadFormat = '<color name="black"><f name ="Interstate RegularCondensed"><z newsize="14">'; bulletCharFormat = '<color name="nsultgreen"><f name ="Interstate Black"><z nesize="10">'; bulletTextFormat = '<color name="black"><f name ="Aldine401 BT"><z newsize="10">'; plainTextFormat ='<color name="black"><f name ="Aldine401 BT"><z newsize="10">'; var result; switch (style) { case "Title": result = titleFormat+text; break; case "Subtitle": result = subtitleFormat+text; break; case "Head": result = headFormat+text; break; case "Subhead": result = subheadFormat+text; break; case "Bullets": var MyVar=text; var MyArray=MyVar.split("<p>"); var MyString='<p>'+bulletCharFormat+'»<t>'+bulletTextFormat+MyArray[0]; if (MyVar==""){ return ""; }else{ for (i=1;i<MyArray.length;i++){ MyString+='<br><p>'+bulletCharFormat+'»<t>'+bulletTextFormat +MyArray[i]; } }; return MyString; break; case "Plain Text": result = plainTextFormat+text; break; default: result = plainTextFormat+text; } return result; };
×
×
  • Create New...