ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Javascripted email showing on some pages, not on others.

January 05, 2011 6:11pm

Subscribe [4]
  • #1 / Jan 05, 2011 6:11pm

    eclectiv

    133 posts

    I took the JavaScript encoded email address that EE produced for me and I placed it through an embed (template) on all my pages.  The email displays correctly on all the pages except one, the contact page.  There’s nothing different on the contact page, so I’m really confused why it’s showing the “JavaScript must be enabled to view this email address” instead of displaying the email address as it does on all the other pages.  Any idea?

  • #2 / Jan 06, 2011 10:45am

    Sue Crocker

    26054 posts

    electiv, which build/version of EE 1.x are you using? You can find that at the bottom of any control panel page.

    What code are you using in that particular template?

  • #3 / Jan 06, 2011 8:32pm

    eclectiv

    133 posts

    I’m using 1.7.0, Build:  20101018.  I’m using the code that’s being generated by EE when it encodes an email address in a weblog entry. 

    <span>.(JavaScript must be enabled to view this email address)</span>[removed] 
    //<![CDATA[
    var l=new Array();
    var output = '';
    l[0]='>';l[1]='a';l[2]='/';l[3]='<';l[4]=' 109';l[5]=' 111';l[6]=' 99';l[7]=' 46';l[8]=' 115';l[9]=' 101';l[10]=' 105';l[11]=' 114';l[12]=' 116';l[13]=' 115';l[14]=' 117';l[15]=' 100';l[16]=' 110';l[17]=' 105';l[18]=' 101';l[19]=' 116';l[20]=' 105';l[21]=' 108';l[22]=' 110';l[23]=' 111';l[24]=' 98';l[25]=' 114';l[26]=' 97';l[27]=' 99';l[28]=' 64';l[29]=' 111';l[30]=' 102';l[31]=' 110';l[32]=' 105';l[33]='>';l[34]='\"';l[35]=' 109';l[36]=' 111';l[37]=' 99';l[38]=' 46';l[39]=' 115';l[40]=' 101';l[41]=' 105';l[42]=' 114';l[43]=' 116';l[44]=' 115';l[45]=' 117';l[46]=' 100';l[47]=' 110';l[48]=' 105';l[49]=' 101';l[50]=' 116';l[51]=' 105';l[52]=' 108';l[53]=' 110';l[54]=' 111';l[55]=' 98';l[56]=' 114';l[57]=' 97';l[58]=' 99';l[59]=' 64';l[60]=' 111';l[61]=' 102';l[62]=' 110';l[63]=' 105';l[64]=':';l[65]='o';l[66]='t';l[67]='l';l[68]='i';l[69]='a';l[70]='m';l[71]='\"';l[72]='=';l[73]='f';l[74]='e';l[75]='r';l[76]='h';l[77]='a ';l[78]='<';
    for (var i = l.length-1; i >= 0; i=i-1){ 
    if (l[i].substring(0, 1) == ' ') output += "&#"+unescape(l[i].substring(1))+";"; 
    else output += unescape(l[i]);
    }
    document.getElementById('eeEncEmail_B1P8o0Wkeb')[removed] = output;
    //]]>
    [removed]
  • #4 / Jan 07, 2011 11:48am

    Ingmar

    29245 posts

    Do you’ve got a link to that contact page? Is there a reason why you aren’t simply using

    {encode="[email protected]" title="Email Me!"}

    ?

  • #5 / Jan 07, 2011 1:50pm

    eclectiv

    133 posts

    How funny.  I didn’t even know about that tag!  I’ll just use that.  Thanks, Ingmar!

  • #6 / Jan 08, 2011 3:05pm

    Greg Salt

    3988 posts

    Hi eclectiv,

    Glad that Ingmar and Sue were able to help. Please post back if required.

    Cheers

    Greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases