Heather and Ariana,
First off, I don't know what the rule "EmailLCRule" actually does (I'm assuming
is just makes it lower-case), but I'm going to give this a try. If I correctly
read what you are trying to do from your "posted" rule you want to return a
tabbed, double line email broken into the name and domain substrings when the
placement of the @ symbol comes after the 21st character position of the
entered email string (JavaScript start counting at position 0), otherwise
return it as a single entry without a line break. Assuming this is correct you
just need to move your current return statement inside the "if" statement, and
add an "else" clause for another single line return.
Try this...
var email = Rule("EmailLCRULE");
var name = email;
var domain = "";
var i = email.indexOf("@");
if (i > 20) {
name = email.substr(0,i);
domain = email.substr(i);
return name + "<br>\n" + "<t tabstops=0;74,Left,,;>" + domain;
}
else {
return email;
}
This will return the value of "[EMAIL PROTECTED]" that you desire without a
break or tabstop entry after it. If you did want to have the break line after
the single entry, then add the "<br>\n" string to the return statement in the
else clause.
---
David A. Sweet
Web Designer/Graphic Designer
HKM Direct Market Communications
A DirectConnectGroup Company
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 09, 2008 9:14 AM
To: FusionPro Users Forum
Subject: [fusionpro] ANY IDEAS??
this is a re-post from [EMAIL PROTECTED] for some reason it completely
cut off her message below that she had typed when she submitted it. very
bizarre.
hopefully someone has an idea on the below. thanks in advance!
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
my working rule says
var email = Rule("EmailLCRULE");
var name = email;
var domain = "";
var i = email.indexOf("@");
if (i > 20)
{
name = email.substr(0, i);
domain = email.substr(i); // i + 1 to remove the "@"
}
// Do whatever with the two parts.
return name +"<br>\n" + "<t tabstops=0;74,Left,,;>" + domain;
This returns:
Return value:
[EMAIL PROTECTED]<br>
<t tabstops=0;74,Left,,;>
BUT I need it to only return this when i < 19
I have added
}
else
{
if (i < 19)
return Rule("EmailLCRULE");
}
and it still returns
Return value:
[EMAIL PROTECTED]<br>
<t tabstops=0;74,Left,,;>
the "<t tabstops=0;74,Left,,;>"
is holding and empty space below the email address
and it is effecting my text alignment
any help is greatly appreciated! thank you!
Ariana
[EMAIL PROTECTED]
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!
Variable text on a curve and soft drop-shadows for variable text
LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade
New licenses available for $599 each at:
http://fusionpro.printable.com/store/
All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
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
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.0/1216 - Release Date: 1/9/2008 10:16
AM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.0/1216 - Release Date: 1/9/2008 10:16
AM
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!
Variable text on a curve and soft drop-shadows for variable text
LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade
New licenses available for $599 each at:
http://fusionpro.printable.com/store/
All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
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
--