Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® Links

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 25th, 2010, 02:42 PM
dana@pip.alaska.com dana@pip.alaska.com is offline
Junior Community Member
 
Join Date: Sep 2008
Location: Anchorage, Alaska
Posts: 21
Default Javascript for a default customer

The FusionPro Links help section states that "JavaScript code within a Microsite can be incorporated to detect when the "Default Customer" account is being viewed and effectively handle any non-applicable personalization in the Microsite."

How exactly is this achieved? I have a personalized message like "Dear First Name" that I would like to display "Dear Valued Customer" when the generic page is accessed.
Reply With Quote
  #2  
Old February 7th, 2014, 09:02 AM
johnw johnw is offline
Junior Community Member
 
Join Date: Sep 2010
Location: Gastonia, NC
Posts: 28
Default Re: Javascript for a default customer

I realize that this thread is 4 years old but I thought I'd post my solution to this in case anyone else needs it.

I added the following javascript to return a generic greeting if the FIRSTNAME field of my list was blank. Otherwise, the personalized greeting was returned.

Code:
<script type="text/javascript">
		if ("<[FIRSTNAME]>" == "") {
			document.write("<p>");
			document.write("<span style='font-size:20px; font-weight:bold; color:#8cc63f;'>Hi!</span> Update your contact information and we'll send you a sweet treat!");
			document.write("</p>");
					}
 		else {
			document.write("<p>");
			document.write("<span style='font-size:20px; font-weight:bold; color:#8cc63f;'>Hi %%FIRSTNAME%%!</span> Update your contact information and we'll send you a sweet treat!");
			document.write("</p>");
					}
			</script>
Interestingly enough, when I had the script writing an input statement for a form field, the prefill values displayed correctly but fpLinks didn't recognize the field when I uploaded it to the microsite.

When I moved the input statement out of the script, fpLinks recognized it.
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 11:06 AM.


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