News:

Looking for documentation? Take a look on our wiki

Main Menu

Usage of faceboxHtml creates W3C error

Started by Eli Alum, October 21, 2011, 07:42:05 AM

Previous topic - Next topic

Eli Alum

Hi,

The following file - administrator/components/com_virtuemart/helpers/config.php configures the faceboxhtml code that is implemented in the main template.

Here is the generated code -

faceboxHtml = "<div id='facebox' style='display:none;'><div class='popup'><div class='content'></div> <a href='#' class='close'><img src='/components/com_virtuemart/assets/images/facebox/closelabel.png' title='close' class='close_image' /></a></div></div>" ;


This code doesn't pass W3C validation, and since it's in the config file, we cannot re-write it in the template file..

Eli.

PRO

how to you suggest to fix it?

I think the only problem is because its in the head and has formatted html, like <div id >   etc

Eli Alum

Hi,

I think if we will use Un-escaped JavaScript, it will work (didn't tried it though).

Something like -

<script type="text/javascript">
//<![CDATA[
var output = "<html><body><p>Hi!<\/p><\/body><\/html>";
//]]>
</script>



atb

Hi, this may have been reported quite some time ago but it does not appear to have been resolved in the released code.  I came across the problem as the root index.php page is now not correctly displayed in IE8 - but OK in Firefox. 
The main VM page is rendered underneath the left column rather than in the middle area - looked like a DIV problem.
Note: this is a clean install of JM and VM, with no sample data.

The attachment is a pdf of the w3 Markup validation, showing 2 errors and 2 warnings (as XHTML 1.0 transitional).  I suspect that the "div" element of facebox is confusing IE8, but not Firefox.
The other errors and warnings are probably independent, but would be better if fixed.

The initial installation of Joomla, prior to VirtueMart, does not give any validation errors. 


JM1.7.4, VM2.0.0 + 2.0.1e.  IE8 and Firefox

[attachment cleanup by admin]