Jump to content

myTable Javascript Issue


dleahy

Recommended Posts

Hello fellas,

 

Having a problem with a mystery indent...:confused:

 

var myTable = new FPTable; myTable.AddColumns(10000,28656); myTable.AddRows(1);

myTable.Rows[0].Cells[0].Font="Arial"; 
myTable.Rows[0].Cells[0].TextColor="Green"; 
myTable.Rows[0].Cells[0].PointSize="9"; 
myTable.Rows[0].Cells[0].Content ="Agenda:"; 
myTable.Rows[0].Cells[0].HAlign="left"; 

myTable.Rows[0].Cells[1].Font="Arial"; 
myTable.Rows[0].Cells[1].TextColor="Black";
myTable.Rows[0].Cells[1].PointSize="9";
myTable.Rows[0].Cells[1].Content= Field("Agenda");

return myTable.MakeTags();

 

Why does the text "Agenda:" have a space before it script is run during FP preview? (see attached screenshot)

Screenshot2012-04-18at1_05_01PM.png.aee67aa586100da0d6bc302f8bb3fc94.png

Link to comment
Share on other sites

Try adjusting the margins of your table:

 

var myTable = new FPTable; myTable.AddColumns(10000,28656); myTable.AddRows(1);

myTable.Rows[0].Cells[0].Font="Arial"; 
myTable.Rows[0].Cells[0].TextColor="Green"; 
myTable.Rows[0].Cells[0].PointSize="9"; 
myTable.Rows[0].Cells[0].Content ="Agenda:"; 
myTable.Rows[0].Cells[0].HAlign="left"; 
[color="Red"]myTable.Rows[0].Cells[0].Margins = new FPTableMargins;
myTable.Rows[0].Cells[0].Margins.Top = 60;
myTable.Rows[0].Cells[0].Margins.Bottom = 60;
myTable.Rows[0].Cells[0].Margins.Left = 0;
myTable.Rows[0].Cells[0].Margins.Right = 0;[/color]

myTable.Rows[0].Cells[1].Font="Arial"; 
myTable.Rows[0].Cells[1].TextColor="Black";
myTable.Rows[0].Cells[1].PointSize="9";
myTable.Rows[0].Cells[1].Content= Field("Agenda");

return myTable.MakeTags();

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...