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

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 30th, 2014, 09:34 AM
bkurzbuch bkurzbuch is offline
Regular Contributor
 
Join Date: May 2014
Posts: 76
Default Adding a space after a line break

I have the code listed below. i need to put in a space or two after the break. I know the code for a space should be &nbsp but I'm unsure of the correct format to get it to work and if I need additional spacing do i just add the same code again? Thank You




if (Field("Family Law") == "Yes")
return "(such as divorce<br>and child custody)";
else
return "";
Reply With Quote
  #2  
Old September 30th, 2014, 01:43 PM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 213
Default Re: Adding a space after a line break

You can add multiple non breaking spaces in succession but you might consider just setting up a tab. It will give you more control over the exact positioning.

Code:
return "such as divorce<br>&nbsp;&nbsp;&nbsp;and child custody";
vs
return "such as divorce<br><t>and child custody";
Reply With Quote
  #3  
Old September 30th, 2014, 01:52 PM
bkurzbuch bkurzbuch is offline
Regular Contributor
 
Join Date: May 2014
Posts: 76
Default Re: Adding a space after a line break

That would be great but, then how do you control the length of the tab. If you can't tell I'm a little new to javascript. Thank you for the help.
Reply With Quote
  #4  
Old September 30th, 2014, 02:04 PM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 213
Default Re: Adding a space after a line break

When you click the text box to open the Variable Text Editor you will see a "Tabs..." button. Make sure you select all the text or the whole line the rule is on. With it highlighted, click the button and you can change the settings in there.

You can also do it programmatically by using the paragraph <p> tag which is outlined in the TagsRefGuide PDF under markup tags.
Reply With Quote
  #5  
Old September 30th, 2014, 02:12 PM
bkurzbuch bkurzbuch is offline
Regular Contributor
 
Join Date: May 2014
Posts: 76
Default Re: Adding a space after a line break

Now that is slick. Thank you VERY much.
Reply With Quote
Reply

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:03 AM.


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