I am having a bit of trouble combining the Copyfit function into a dynamic
table generator. Any one ever used the FusionPro Text Measure object to
create dynamic table sizes or font resizing in FusionPro. I assume that
counting the stacked text per cell and then determining what the longest
string inside that column width would be the first step but what would be
the best option to incorporate the copyfit function. My tables look like
this:
function generateMarkup(schoolName, metalList) {
var metalTitles;
var markupBegin;
var markupMiddle='';
var markupEnd = "\n</table>";
if (metalList == '10K 14K') {
markupBegin = '<table columns = "3"
columnrules=" frequency:1;default:thin,black;alternate:thin,black"
alignment="left" space="above:0;below:-25"> \n<column width = 12222>\n<column
width = 8221>\n<column width = 8221>';
metalTitles = ['10K','14K'];
}
else {
markupBegin = '<table columns = "4"
columnrules=" frequency:1;default:thin,black;alternate:thin,black"
alignment="left" space="above:0;below:-25"> \n<column width = 13416>\n<column
width = 5416>\n<column width = 5416>\n<column width = 5416>';
if (metalList == '10K 14K 18K') {
metalTitles = ['10K','14K','18K'];
}
else {
metalTitles = ['CEL','10K','14K']
}
}
var theGender;
var theStyle;
var mySchool = schoolHash.getItem(schoolName);
for (var i = 0; i < mySchool.genderList.length; i++) {
theGender = mySchool.genderList[i];
markupMiddle = markupMiddle + '\n<row><z
newsize="12">'
markupMiddle = markupMiddle + '\n<cell
rulings="top:thin,BLACK;bottom:thin,BLACK"><f name="Times LT Std Bold"><p
br=false quad=L>' + theGender.genderName;
if (metalTitles[0] == 'CEL') {
markupMiddle = markupMiddle + '\n<cell
rulings="top:thin,BLACK;bottom:thin,BLACK"><p br=false quad=C>Celestrium';
}
else {
markupMiddle = markupMiddle + '\n<cell
rulings="top:thin,BLACK;bottom:thin,BLACK"><p br=false quad=C>' +
metalTitles[0];
}
markupMiddle = markupMiddle + '\n<cell
rulings="top:thin,BLACK;bottom:thin,BLACK">' + metalTitles[1];
if (typeof(metalTitles[2]) != 'undefined')
{markupMiddle =
markupMiddle + '\n<cell rulings="top:thin,BLACK;bottom:thin,BLACK">' +
metalTitles[2];}
for (var j = 0; j < theGender.styleList.length;
j++){
theStyle = theGender.styleList[j];
markupMiddle = markupMiddle +
'\n<row><z newsize="8"><p br=false quad=L><f name="Times LT Std Bold">'
markupMiddle = markupMiddle +
'\n<t><cell><p br=false quad=L>'+theStyle.styleName+'<f name="Times LT Std"><z
newsize="8"> '+theStyle.code;
for (var k = 0; k < metalTitles.length;
k++){
try {
markupMiddle =
markupMiddle +
'\n<cell><z newsize="9"><p br=false
quad=C>'+theStyle.metalHash.getItem(metalTitles[k]).price+'<f name="Times LT
Std Italic"><z
newsize="8"> '+theStyle.metalHash.getItem(metalTitles[k]).payplan+'*<f
name="Times LT Std">'
}
catch (e) {
markupMiddle =
markupMiddle + '\n<cell><z newsize="9"><p br=false quad=C>N/A<f name="Times LT
Std">'
}
}
}
}
return markupBegin + markupMiddle + markupEnd;
}
return
generateMarkup(Field("School").toUpperCase(),Field("MetalSelection"));
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Calling all FP Web Users!
Do you have a question or lots of knowledge to share about FusionPro Web?
If so, join our Printable Web to Print Users' Forum today!
Send email to [EMAIL PROTECTED] to find out how!
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm
--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--
--
Note: All e-mail sent to or from this address will be received or otherwise
recorded by the e-mail recipients of this forum. It is subject to archival,
monitoring or review by, and/or disclosure to someone other than the recipient.
Our privacy policy is posted on www.printplanet.com
--