onclick event not firing in Chrome -...

User 184085 Photo


Ambassador
1,707 posts

by the way, i like the purple guy, looks like velvet :)
Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/
User 2073490 Photo


Registered User
154 posts

Thanks, David. Thanks for noticing the missing doctype. I put that in and it did not change anything.
However, I did go back to the image mapper pulled up the maps, copied the code again and replaced it in my html page. Now it works. I went back to the validator, did it again, and the "Tidy" version supplied to me had taken out the doctype again, and also revised the first line of code in the image map.

It changed from this:
<img src="images/anatomyant.gif" USEMAP="#Pain map anterior" BORDER=0>
<map name="Pain map anterior">


to this:
<img src="images/anatomypost.gif" usemap="#NotNamed" border="0" alt="** PLEASE DESCRIBE THIS IMAGE **" /><map name="NotNamed">

This made my image map turn into just a plain old image again, with **Please Describe This Image** as a hovering title.

Do you think this is because it is interpreting this image map as an image with no definable alt tag?
If so, do I need to change something to make it acceptable to WC3, or does the Tidy Library Project need to be informed of this, so they can do something with it? I don't know enough to make that decision, I guess. I would be happy to insert some kind of an alt tag, if that is the problem.

What do you think?

Purple guy does look a little velvety. I thought he needed puffy yellow wig, and a Turkey named Gobbles to go with it! lol.
User 463058 Photo


Ambassador
1,086 posts
Online Now

Change this:
<img src="images/anatomyant.gif" USEMAP="#Pain map anterior" BORDER=0>
<map name="Pain map anterior">



To this:
<img src="images/anatomyant.gif" usemap="#PainMapAnterior" border="0" alt="" />
<map name="PainMapAnterior">


Notice the lack of spaces in the map name among the changes. You don't need any alt text, just the attribute.
User 2073490 Photo


Registered User
154 posts

I followed your instructions, Cary, and it made no difference. Tidy still inserts **Please Describe This Image**.

I'm just gonna leave it. They can come after me if they want to...

That is not the only thing wrong. I'm going down for bad protocol. lol.
User 463058 Photo


Ambassador
1,086 posts
Online Now

Yes, tidy adds the text, just delete the text. Tidy knows that images need an alt attribute, but it has no way of knowing when an image actually needs alt text.

I would suggest you use a validator to find mistakes and fix them manually as needed, rather than just letting Tidy have free reign. The fact that it removes your doctype is not good.
User 2073490 Photo


Registered User
154 posts

The idea was to see if it could help me correct a problem that I had, and could not figure out on my own. I certainly intend to use it as a learning tool. It seems that when I follow the instruction in the book I am using, most things do not turn out the way I think they are supposed to. I imagine that there is some degree of user error, some obsolete info, and most likely, a lack of comprehensive info.

Should I consider that maybe it could be removing my doctype because the code is not up to par?
Using HTML 4.01 Transitional.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.