[thelist] Javascript Validation Help - Comodo TrustLogo Display Script

Ron Dorman rwd at csi1st.net
Sun Feb 12 13:34:54 CST 2006


Implementing two scripts, provided by Comodo (InstantSSL) to display the 
Trustlogo and link to SSL validation info, into a clients new site has 
generated problems.

The script will not validate XHTML 1.0 Strict - I have replaced 
'language' parameters in the script tag with 'type' to correct most of 
the errors. However, one error remains. The script executes a 
'document.writeln' to write a new short script into the source after 
setting a variable which causes a "document type does not allow element 
'script' here" error in the W3C validator.

Here is the current version of the two scripts:
This just before the </head> element

<script type="text/javascript">
var cot_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/cot.js" :
"http://www.trustlogo.com/trustlogo/javascript/cot.js";
document.writeln('<script type="text\/javascript" src="'+cot_loc0+'"><\/script>');
</script>

This one just before the </body> element

<script type="text/javascript">COT("http://marciekerby.com/files/secure_site.gif", "SC2", "none");</script>


I am not very educated in javascript and I have not been able to figure 
out how to modify the first script into validation and keep it 
functioning. Any direction on this is where I am seeking help.

Without the scripts in the template, the site works cleanly. With both 
scripts in the template, the site still functions, the Trustlogo is 
displayed and ssl validation works. However we get display issues in FF 
when scrolling, images and text jump up and down in a stair step 
appearance (I can't recall what this called). In IE, the peek-a-boo bug 
is triggered (probably because the Trustlogo is attached to the bottom 
right corner of the window and I will need one of the fix hacks), but I 
don't want to chase that issue until I get the validation fixed as valid 
code may fix both issues.

The site can be accessed with http://tinyurl.com/8gqs9 and the display 
issues are most noticable on the Dusty Road CD page.

Thanks,
Ron D.




More information about the thelist mailing list