Javascript snippet prevents W3C validation of html on page

TNC Discussion Board: Web Page Design: Javascript snippet prevents W3C validation of html on page
  Subtopic Posts   Updated


Top of pagePrevious messageNext messageBottom of pageLink to this message   By Lesley Halamek on Sunday, December 14, 2003 - 02:37 am:

Can anyone please help?
I recently purchased the upgrade to the Website Builder, and used one of the "Freebies" to enlarge a large number of photos on a garden and landsape website.
>
> I then attempted to validate css and html for the index page on the site below, and struck a snag with the html.
> I have enclosed the W3C Validation Service comments, and part of the <head> </head> of the index page. I do not understand javascript, and do not know what is required to make the Line 20 entry acceptable.
>
> I would appreciate any help or advice anyone is able to give me.
>
> Many thanks,
>
> Lesley Halamek
> http://halamuspublishing.com.au
>


>P.S. Code follows in next post...
>
>
>
>
>

Top of pagePrevious messageNext messageBottom of pageLink to this message   By Lesley Halamek on Sunday, December 14, 2003 - 02:42 am:

cont. from above...

> W3C MarkUp Validation Service
>
>
> File: c:^#92;SWANE'S GARDEN CARE AND LANDSCAPES^#92;index.html
> Encoding: windows-1252
> Doctype: HTML 4.0 Transitional
> Errors: 1
>
> This page is not Valid HTML 4.0 Transitional!
> Below are the results of attempting to parse this document with an SGML
> parser.
> 1. Line 20, column 29: required attribute "TYPE" not specified
(explain...).
>
> ^
>
>
> Source Listing
> Below is the source input I used for this validation:
> 1:

> 19:
> 20:
> 21: 22: imagename='';
> 23: function enlrge(imgnme)
> 24: {
> 25: OpenWin =
>
this.open("","CtrlWindow","toolbar=No,menubar=No,location=No,scrollbars=No,r
esizable=No,status=No,width=260,height=250,left=150,top=150,");
> 26: imagename = imgnme;
> 27: setTimeout('update()',500)
> 28: }
(cont. below)

Top of pagePrevious messageNext messageBottom of pageLink to this message   By Lesley Halamek on Sunday, December 14, 2003 - 02:46 am:

(cont. from above)


> 29: function update()
> 30: {
> 31: doc = OpenWin.document;
> 32: doc.write('Enlarged Image bgcolor="white" onBlur="self.focus()">');
> 33: doc.write('');
> 34: doc.write(' Window"onClick="window.close()">');
> 35: doc.close();
> 36: }
> 37: //-->
> 38:
>

> 39:

....or should I just forget javascript and enlarge the photos using html?

Top of pagePrevious messageNext messageBottom of pageLink to this message   By dreuby on Sunday, December 14, 2003 - 07:52 pm:

I use js to produce a larger version in a new window when the user clicks the thumbnail - is that what you want to do? I got mine from http://javascriptkit.com (JK Pop up image viewer) - you could see what he does that is different. I don't get HTML check errors on my pages.

Top of pagePrevious messageNext messageBottom of pageLink to this message   By Lesley Halamek on Sunday, December 14, 2003 - 11:50 pm:

Thanks dreuby. That's exactly what I want to do. I'll try your link.

LH


Add a Message


This is a public posting area. If you do not have an account, enter your full name into the "Username" box and leave the "Password" box empty. Your e-mail address is optional.
Username:  
Password:
E-mail:
Post as "Anonymous"

Administrator's Control Panel -- Board Moderators Only
Administer Page