Solved! Go to Solution.
Hi Carrie,
Replace your landing page content block that contains the JavaScript code you added to prepopulate the email field on the landing page with the following code:
<script language="Javascript" src="/js/public/jquery-latest.min.js" type="text/javascript"></script>
<script src="/js/public/jQueryString-2.0.2-Min.js" type="text/javascript" ></script>
<script>
// to set cookies. Uses noConflict just in case
var $jQ = jQuery.noConflict();
var pEmail = $jQ.getQueryString({ ID: "Email" });
//--> I added this conditional statement <-- //
if (! pEmail) {
//alert('Email address is undefined!');
document.getElementById("Email").setAttribute("value", '');
};
</script>
Let me know how that goes!
Reade
Thanks for your response Reade, the code we're using is the same as that in the article:
<script language="Javascript" src="/js/public/jquery-latest.min.js" type="text/javascript"></script>
<script src="/js/public/jQueryString-2.0.2-Min.js" type="text/javascript" ></script>
<script>
// to set cookies. Uses noConflict just in case
var $jQ = jQuery.noConflict();
var pEmail = $jQ.getQueryString({ ID: "Email" });
document.getElementById("Email").setAttribute("value", pEmail);
</script>
Hi Carrie,
Replace your landing page content block that contains the JavaScript code you added to prepopulate the email field on the landing page with the following code:
<script language="Javascript" src="/js/public/jquery-latest.min.js" type="text/javascript"></script>
<script src="/js/public/jQueryString-2.0.2-Min.js" type="text/javascript" ></script>
<script>
// to set cookies. Uses noConflict just in case
var $jQ = jQuery.noConflict();
var pEmail = $jQ.getQueryString({ ID: "Email" });
//--> I added this conditional statement <-- //
if (! pEmail) {
//alert('Email address is undefined!');
document.getElementById("Email").setAttribute("value", '');
};
</script>
Let me know how that goes!
Reade