p.kennedy Posted March 7, 2012 Share Posted March 7, 2012 I am looking for some javascript that will keep an image aligned with a line of text no matter where that line appears in a textbox... Any ideas? Link to comment Share on other sites More sharing options...
step Posted March 7, 2012 Share Posted March 7, 2012 Sounds like an image tag would solve your problem Link to comment Share on other sites More sharing options...
p.kennedy Posted March 7, 2012 Author Share Posted March 7, 2012 I'm no good at javascript and don't know where to begin Link to comment Share on other sites More sharing options...
step Posted March 7, 2012 Share Posted March 7, 2012 Read this post Link to comment Share on other sites More sharing options...
p.kennedy Posted March 8, 2012 Author Share Posted March 8, 2012 I still can't figure it out. If I upload the job could you take a look? Link to comment Share on other sites More sharing options...
Dan Korn Posted March 8, 2012 Share Posted March 8, 2012 I still can't figure it out. If I upload the job could you take a look? There's no guarantee that anyone will look at it, but a picture is always worth a thousand words, so uploading the job will absolutely make it easier for someone to help. Link to comment Share on other sites More sharing options...
p.kennedy Posted March 8, 2012 Author Share Posted March 8, 2012 Thanks Dan. The problem starts on body page 4. The versions with 2 "stories" there is a thumbnail image that goes along with each story title. The story two title and thumbnail need to stay aligned no matter the length of the first story. If anyone looks at this and needs to ask any questions I will be available all day to reply to anythingPK_NL_Template.zip Link to comment Share on other sites More sharing options...
Dan Korn Posted March 9, 2012 Share Posted March 9, 2012 Instead of having the graphics in their own graphic frames, I would use inline graphics, as suggested. And to get everything to flow the way you want, I would put the inline graphics and the text in a table, something like this: var table = new FPTable; table.AddColumns(6000, 30000); table.AddRows(2); table.Rows[0].Cells[0].Content = '<graphic file="' + Field("Thumbnail") + '" width="' + (table.Columns[0].Width - 2000) + '" />'; table.Rows[0].Cells[1].Content = '<color name="DLCOLOR_5"><z newsize="21">' + TaggedDataField("Story1Title") + '<p><color name="70K"><z newsize="10">' + TaggedDataField("Stroy1Content"); table.Rows[1].Cells[0].Content = '<graphic file="' + Field("BottomThumbnail") + '" width="' + (table.Columns[0].Width - 2000) + '" />'; table.Rows[1].Cells[1].Content = '<color name="DLCOLOR_5"><z newsize="21">' + TaggedDataField("Story2Title") + '<p><color name="70K"><z newsize="10">' + TaggedDataField("Story2Content"); return table.MakeTags(); You can change the widths of the columns in the call to table.AddColumns() as needed. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.