News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Compliance issue in classes/ps_userfield.php

Started by doorknob, August 26, 2008, 02:28:17 AM

Previous topic - Next topic

doorknob

The javascript at lines 505 to 523 causes an xhtml compliance issue. I changed it from:
    echo '<script type="text/javascript">
   function showFields( show, fields ) {
    if( fields ) {
var i;
    for (i=0; i<fields.length;i++) {
    if( show ) {
    document.getElementById( fields[i] + \'_div\' ).style.display = \'\';
    document.getElementById( fields[i] + \'_input\' ).style.display = \'\';
    } else {
    document.getElementById( fields[i] + \'_div\' ).style.display = \'none\';
    document.getElementById( fields[i] + \'_input\' ).style.display = \'none\';
    }
    }
    }
   }
   try {
    showFields( document.getElementById( \'register_account\').checked, new Array(\'username\', \'password\', \'password2\') );
   } catch(e){}
   </script>';

to
    echo '<script type="text/javascript">
//<![CDATA[
   function showFields( show, fields ) {
    if( fields ) {
var i;
    for (i=0; i<fields.length;i++) {
    if( show ) {
    document.getElementById( fields[i] + \'_div\' ).style.display = \'\';
    document.getElementById( fields[i] + \'_input\' ).style.display = \'\';
    } else {
    document.getElementById( fields[i] + \'_div\' ).style.display = \'none\';
    document.getElementById( fields[i] + \'_input\' ).style.display = \'none\';
    }
    }
    }
   }
   try {
    showFields( document.getElementById( \'register_account\').checked, new Array(\'username\', \'password\', \'password2\') );
   } catch(e){}
   //]]>
   </script>';

to hide the js and the issue was resolved.

Regards
Phil