Click here to get back home

div as link not working in explorer

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
div as link not working in explorer pistacchio 09-07-2007
Posted by pistacchio on September 7, 2007, 12:47 pm
Please log in for more thread options


hi to all!
the site i'm working on ( http://www.gdp-portfolio.net/as/ ) is html
4.1 strict valid. needless to say, it has some incompatibility problem
with explorer (testing with IE 6.0).

The menu works great with firefox going from one page to the other.
the code is:

<a href = "#"><button><div id = "Bmenu2" onClick = "document.location
= 'index.php?p=Chi'" onMouseOut = "javascript: menu.nascondi(2);"></
div></button></a>

and it doesn't work in IE. i've altro tried:
- "onClick" in <button>
- setting the href in <a>

but no solution seems to work. any help?
thanks in advance - gu


Posted by Bergamot on September 7, 2007, 1:03 pm
Please log in for more thread options


pistacchio wrote:
>
> the site i'm working on ( http://www.gdp-portfolio.net/as/ ) is html
> 4.1 strict valid.
>
> <a href = "#"><button><div id = "Bmenu2" onClick = "document.location
> = 'index.php?p=Chi'" onMouseOut = "javascript: menu.nascondi(2);"></
> div></button></a>

I'm surprised this validates, since you have a block level element
(<div>) within an inline element (<a>), which is invalid. The
superfluous <button> in between is probably confusing things.

There should be no reason for this markup mess, but then I don't know
what your menu code does. I'll just comment that using such a navigation
system is unfriendly to both users and search engines. You should
rethink the whole thing.

--
Berg

Posted by Andy Dingley on September 7, 2007, 1:19 pm
Please log in for more thread options



> > <a href = "#"><button><div id = "Bmenu2" onClick = "document.location
> > = 'index.php?p=Chi'" onMouseOut = "javascript: menu.nascondi(2);"></
> > div></button></a>
>
> I'm surprised this validates, since you have a block level element
> (<div>) within an inline element (<a>),

It doesn't, or at least not to generate the DOM that the OP expected


Yes, remove the block elements from inside the inlines and get it
valid. Then worry about the details.


Posted by pistacchio on September 7, 2007, 1:19 pm
Please log in for more thread options


> pistacchio wrote:
>
> > the site i'm working on (http://www.gdp-portfolio.net/as/) is html
> > 4.1 strict valid.
>
> > <a href = "#"><button><div id = "Bmenu2" onClick = "document.location
> > = 'index.php?p=Chi'" onMouseOut = "javascript: menu.nascondi(2);"></
> > div></button></a>
>
> I'm surprised this validates, since you have a block level element
> (<div>) within an inline element (<a>), which is invalid. The
> superfluous <button> in between is probably confusing things.
>
> There should be no reason for this markup mess, but then I don't know
> what your menu code does. I'll just comment that using such a navigation
> system is unfriendly to both users and search engines. You should
> rethink the whole thing.
>
> --
> Berg


thnaks for the reply. the "markup" mess is required by the validator.
get rid of the <button> tag and you get:

document type does not allow element "DIV" here; missing one of
"OBJECT", "MAP", "BUTTON" start-tag

my code is a navigation menu. you click on the buttons (that are divs
with a proper background image). the links, translated from italian,
are nothing extremely obscure: home, who we are, services.. i think
your comment on user-unfriendliness is interesting. i think the
avarage user has no problem in inferring that when on the menu of a
page there is a link with written "who we are", you can click on it
and have information on "who we are".


Posted by Bergamot on September 7, 2007, 11:39 pm
Please log in for more thread options


pistacchio wrote:
>> pistacchio wrote:
>> > (http://www.gdp-portfolio.net/as/)
>>
>> > <a href = "#"><button><div id = "Bmenu2" onClick = "document.location
>>
>> There should be no reason for this markup mess, but then I don't know
>> what your menu code does. I'll just comment that using such a navigation
>> system is unfriendly to both users and search engines.
>
> the "markup" mess is required by the validator.

No, it is a hack to get around a validation error. It is incorrect and
illogical markup, and you don't really need it. I think Mr Little
already gave an alternative.

> your comment on user-unfriendliness is interesting. i think the
> avarage user has no problem in inferring that when on the menu of a
> page there is a link with written "who we are", you can click on it
> and have information on "who we are".

It's the construction method that is unfriendly. The navigation requires
JavaScript, which search engines ignore, so anything past the home page
is pretty much invisible. People who don't have JavaScript enabled won't
get past the home page, either.

--
Berg

Similar ThreadsPosted
URL link using Button not working in IE June 8, 2005, 2:43 pm
Problem with Anchor link now working properly in IE! February 1, 2005, 12:33 pm
Menu links in frame not working after I link to external site using IE January 18, 2008, 7:18 pm
Internet Explorer Bug? May 22, 2006, 6:05 pm
css & internet explorer January 10, 2008, 4:55 am
Box Model in Internet Explorer 7.0 May 16, 2005, 10:22 am
subscripts on Internet Explorer March 7, 2005, 9:25 am
Spacing Problem in Explorer February 6, 2008, 8:49 am
Button Element and Internet Explorer 6.0 August 3, 2004, 8:24 am
internet explorer vs firefox vs netscape March 1, 2005, 7:13 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap