PDA

View Full Version : HTML help


Nevarwinter
February 23, 2011, 10:28
Hi guys.

I know we have some computer folks in here and i'm in need of some help. The company I do catalogs for needed a website, so I taught myself HTML and threw one up for them (throw up is apt in this instance). It's a very basic site, basic template, basic everything.

They wanted to upgrade it a little, so I did so. The problem is that I was testing the site in both IE and Firefox and it worked fine. When it was made live last night, the button links don't work in IE but work fine in Firefox. I've read that it is a IE problem, not a pebkac (problem exists between keyboard and chair) error.

Here's the button code:


<a href="products/airanalysis.html" target="_top">
<button type="button" onclick="products/airanalysis.html">
<img src="images/air_analysis.jpg" alt="airanalysis" align="middle" height="120" width="120" /></button></a>

(No, it's not php. The code tags weren't displaying code, just the button image, so I had to put the php tags around it)

Any help?

fnogger
February 23, 2011, 10:36
You are wrapping a HTML link (the a tag) around a form element (the button) and calling a javascript function for the onclick event for the button... but the question becomes which is getting clicked, the button w/ javascript event or the link?

Ditch the


<button ...


line

Nevarwinter
February 23, 2011, 10:53
thank you very much for the help. I'm going to fix the code and see if it works in IE. I assumed it was the button inside of the ahref tag, because that's what folks were saying on different forums, but they had all these ridiculous work-arounds using javascript. There had to be a simpler way.

Thanks again!

Nevarwinter
February 23, 2011, 11:13
and yes, it works!

It looks a lot different between the two browsers but it works and that's all that matters.

Thanks a bunch, man!

fnogger
February 24, 2011, 08:12
You may want to throw a border=0 in the img tag as well to keep the blue outline off of it...