open larger photo in new window

K

K.

Hello!

I have a question to you.

I have created a web page:

http://www.slub.zmyslowski.pl/index.php?typ=galeria#

When I validate my page by w3 validator:

http://validator.w3.org/check?uri=http://www.slub.zmyslowski.pl/index.php?typ=galeria#

I get a few errors in the javascript script, which I added to enlrage small
photo placed in my gallery.

Could you tell me how should I modify this javascript code to make it valid
and good in HTML standard.

Or maybe you have other script which work perfectly and is HTML valid and
return no errors and work the same as mine?

Thank you in advance for help
Marcin from Poland
 
P

purcaholic

Hello!

I have a question to you.

I have created a web page:

http://www.slub.zmyslowski.pl/index.php?typ=galeria#

When I validate my page by w3 validator:

http://validator.w3.org/check?uri=http://www.slub.zmyslowski.pl...

I get a few errors in the javascript script, which I added to enlrage small
photo placed in my gallery.

Could you tell me how should I modify this javascript code to make it valid
and good in HTML standard.

Or maybe you have other script which work perfectly and is HTML valid and
return no errors and work the same as mine?

Thank you in advance for help
Marcin from Poland

Hi,

a content inside a script or style tag should be marked as a comment,
otherwhise the validator will try to parse it. the result ar some
thrown errory by the validator.
Example:
[snip]
<script type="text/javascript">
/* <![CDATA[ */

// your javascript code here

/* ]]> */
</script>
[/snap]

But the nifty way is to outsource the whole script into an javascript
file, and to add an reference to this file inside the header.
Example:
[snip]
<script type="text/javascript" src="path_to_script.js"></script>
[/snap]

I suppose, this will solve a little part of youre validation errors.
It seems to be a long way, to get an valid XHTML-Strict content...

purcaholic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top