Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Tables & Charts

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old October 26th, 2011, 12:48 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,359
Default Re: JavaScript Table API – The Basics

Quote:
Originally Posted by NPN View Post
Can this be used to solve the problem in this thread?

http://forums.pti.com/showthread.php...border+graphic

Meaning, can you make a dynamic table cell that fits to an uploaded graphic then make a border around it?
Yes. I'll answer in that other thread to keep this one on a narrower topic.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #12  
Old November 7th, 2011, 01:36 PM
Doug Pershing's Avatar
Doug Pershing Doug Pershing is offline
Junior Community Member
 
Join Date: Aug 2008
Location: Phoenix, AZ
Posts: 37
Default Re: JavaScript Table API – The Basics

I don't see a way to span rows or columns. Am I missing something?
Reply With Quote
  #13  
Old November 7th, 2011, 03:24 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,359
Default Re: JavaScript Table API – The Basics

Quote:
Originally Posted by Doug Pershing View Post
I don't see a way to span rows or columns. Am I missing something?
This is called "straddle" in FusionPro. From the original post:
Quote:
Originally Posted by Dan Korn View Post
To combine or merge cells together, HStraddle and VStraddle can be used to straddle cells both Horizontally and Vertically:
Code:
myTable.Rows[3].Cells[0].HStraddle = 2;
myTable.Rows[3].Cells[2].VStraddle = 2;

These properties correspond to the HStraddle and VStraddle attributes of the <cell> tag, as documented in the Tags Reference Guide.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #14  
Old November 7th, 2011, 03:44 PM
Doug Pershing's Avatar
Doug Pershing Doug Pershing is offline
Junior Community Member
 
Join Date: Aug 2008
Location: Phoenix, AZ
Posts: 37
Default Re: JavaScript Table API – The Basics

Thanks Dan. I found it just before you replied.
Reply With Quote
  #15  
Old November 20th, 2011, 04:25 PM
Doug Pershing's Avatar
Doug Pershing Doug Pershing is offline
Junior Community Member
 
Join Date: Aug 2008
Location: Phoenix, AZ
Posts: 37
Default Re: JavaScript Table API – The Basics

Using the VStraddle causes the cell contents to duplicate down a cell.
Reply With Quote
  #16  
Old November 28th, 2011, 10:50 AM
DSweet's Avatar
DSweet DSweet is offline
Senior Contributor
 
Join Date: Sep 2008
Location: Oberlin, Ohio
Posts: 240
Default Re: JavaScript Table API – The Basics

Going back to your original post...your command to set the borders of the table includes the "thickness", "color" and "locations". MUST all these be equal? If I wanted to have a top and bottom border different from the left and right border how would I code this?

I tried something like
Code:
    text.Rows[0].Cells[0].SetBorders.Top("Thin", "Red");
    text.Rows[0].Cells[0].SetBorders.Bottom("Thin", "Green");
    text.Rows[0].Cells[0].SetBorders.Right("Medium", "Blue");
    text.Rows[0].Cells[0].SetBorders.Left("Medium", "Black");
but that caused an error stating that
Code:
text.Rows[0].Cells[0].SetBorders.Top is not a function
I would like to know how to set each one in a tag.
Thanks.
.
__________________
David A. Sweet
Variable Data Specialist
HKM Direct Market Communications
Windows 7, Acrobat 10.x
FusionPro Desktop and Server 10.0.26
Reply With Quote
  #17  
Old November 28th, 2011, 11:13 AM
Doug Pershing's Avatar
Doug Pershing Doug Pershing is offline
Junior Community Member
 
Join Date: Aug 2008
Location: Phoenix, AZ
Posts: 37
Default Re: JavaScript Table API – The Basics

Top is not a function it is a parameter. Try this:
Code:
text.Rows[0].Cells[0].SetBorders("Thin", "Red", "Top");
text.Rows[0].Cells[0].SetBorders("Thin", "Green", "Bottom");
text.Rows[0].Cells[0].SetBorders("Medium", "Blue", "Right");
text.Rows[0].Cells[0].SetBorders("Medium", "Black", "Left");
Reply With Quote
  #18  
Old November 28th, 2011, 04:17 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,359
Default Re: JavaScript Table API – The Basics

Quote:
Originally Posted by Doug Pershing View Post
Top is not a function it is a parameter. Try this:
Code:
text.Rows[0].Cells[0].SetBorders("Thin", "Red", "Top");
text.Rows[0].Cells[0].SetBorders("Thin", "Green", "Bottom");
text.Rows[0].Cells[0].SetBorders("Medium", "Blue", "Right");
text.Rows[0].Cells[0].SetBorders("Medium", "Black", "Left");
Yes, that's correct. You could also do this:
Code:
text.Rows[0].Cells[0].Rulings.Top.Color = "Red";
text.Rows[0].Cells[0].Rulings.Top.Thickness = "Thin";
text.Rows[0].Cells[0].Rulings.Bottom.Color = "Green";
text.Rows[0].Cells[0].Rulings.Bottom.Thickness = "Thin";
text.Rows[0].Cells[0].Rulings.Right.Color = "Blue";
text.Rows[0].Cells[0].Rulings.Right.Thickness = "Medium";
text.Rows[0].Cells[0].Rulings.Left.Color = "Black";
text.Rows[0].Cells[0].Rulings.Left.Thickness = "Medium";
By the way, this entire table API is defined in the Builtins.js file, so feel free to look at the code and see how it generates the table tags. Please do not edit the Builtins.js file, however.

Please feel free to suggest improvements to the API as well, since it's still open for enhancements. For instance, in the latest 7.2P1k release, there's a new FPTable.NewRow() function which returns the newly-added FPTableRow object, so that you don't have to remember the row index.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #19  
Old November 28th, 2011, 04:25 PM
Doug Pershing's Avatar
Doug Pershing Doug Pershing is offline
Junior Community Member
 
Join Date: Aug 2008
Location: Phoenix, AZ
Posts: 37
Default Re: JavaScript Table API – The Basics

Thanks Dan that helps. I have had trouble with the VStraddle command. Whenever I use it the contents of the cell always duplicates into the straddled cell below it. HStraddle works fine. Do you have any idea why the VStraddle would duplicate the contents? I removed all CopyCells commands to make sure it wasn't something I was doing.
Reply With Quote
  #20  
Old November 29th, 2011, 07:45 AM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,359
Default Re: JavaScript Table API – The Basics

Quote:
Originally Posted by Doug Pershing View Post
Thanks Dan that helps. I have had trouble with the VStraddle command. Whenever I use it the contents of the cell always duplicates into the straddled cell below it. HStraddle works fine. Do you have any idea why the VStraddle would duplicate the contents? I removed all CopyCells commands to make sure it wasn't something I was doing.
Please create a new thread with your specific question. If you can post an example, that would be great.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
Reply

Tags
javascript, tables

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:09 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.