PDA

View Full Version : Image Thumbnail Viewer II - There is no attribute 'preload'



davidrk
01-20-2012, 09:13 AM
1) Script Title: Image Thumbnail Viewer II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

3) Describe problem: I'm attempting to validate a page and keep received the following error: there is no attribute "preload". I have written the code as follows -


<a href="images/large/m_thirteen_1.jpg" rel="enlargeimage" rev="targetdiv:right" preload="yes"><img src="images/large/m_thirteen_thumb1.jpg" alt="" width="100" height="75" border="0" /></a>

The doctype is XHTML 1.0 Transitional.

Any help with rectifying this would be much appreciated!

jscheuer1
01-20-2012, 09:39 AM
As indicated by the code of Step 2 on the demo page, the correct syntax for the script would be:


<a href="images/large/m_thirteen_1.jpg" rel="enlargeimage" rev="targetdiv:right,preload:yes"><img src="images/large/m_thirteen_thumb1.jpg" alt="" width="100" height="75" border="0" /></a>

However, since preload:yes is the default, you can skip it altogether:


<a href="images/large/m_thirteen_1.jpg" rel="enlargeimage" rev="targetdiv:right"><img src="images/large/m_thirteen_thumb1.jpg" alt="" width="100" height="75" border="0" /></a>

I don't know if that will validate or not to that DOCTYPE, but I think it will. If not, we will probably have to modify the script to use a data-attribute and an HTML 5 DOCTYPE. But give the above a go first.

davidrk
01-20-2012, 10:41 AM
Thanks again John. Leaving out the preload reference validated fine.
Cheers!