Problem with Image Width and Height in v5 and Alt Text

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
tomistrugar
Beginner
Beginner
Posts: 6
Joined: Wed Apr 23, 2003 7:25 am

Problem with Image Width and Height in v5 and Alt Text

Post by tomistrugar »

When I add an image to a menu item and I specify an imagewidth and imageheight it seems only the imageheight is read, the imagewidth is ignored, and the image is scaled accordingy. Am I using the correct syntax?

eg.

aI("url=/index.html;status=Home Page;image=/menu5/logo.gif;imageheight=101;imagewidth=206;");

Also, the height and width values give different sizes from the same values when used in v3 of the menu. Why is this so and are the values in pixels?

Lastly, is it possible to add 'alt' text for the image?

Your help will be much appreciated.

Thanks
Tomi
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Your syntax looks fine from what I can see. Do you have a URL so we may see it?

Right now there is no way using the menu's features to put in an alt into the image. But you can get around this until we put it in (I think it will someday, thats what I think) by hard coding an img tag into the menu item. See this example.

Code: Select all

aI("text=<img alt='...' height='22' width='22'  src=''>Blah;url=www.google.com;");
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hold on a second, this was added ages ago. . . ..

I see the problem now. The quick refefences were using an old copy of milonic_src.js - no wonder the updates were wrong.

Anyway, you should be able to use imagealt in a menu item containing an image.

Cheers
Andy
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Excellent! Nice job Andy. But you can't fault me, I tried looking it up before I posted that to be sure! :D But so everyone knows, that was a feature request made not too long ago, maybe a month or so ago, and its already in there. Great job boss. :)
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
DMLCo
Advanced
Advanced
Posts: 21
Joined: Fri Sep 19, 2003 4:29 pm
Location: Houston, TX
Contact:

ADA Compliance

Post by DMLCo »

Just as an FYI for folks in the USA: this is a crucial feature, as if you are using image based menuing and you _don't_ include ALT tags, your site is essentially non-navigable by the software used by vision-impaired users.

It also is no longer ADA Compliant, which may or may not matter ...

If you've never done it, download one of the website reading pieces of software and take a look at your site: the first time you do it, it's positively scary.

-Daniel
DMLCo
Solving the Challenges Where People & Technology Meet
Featuring DMLContent Content Management System
http://www.dmlco.com/
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

This subject is discussed in suggestions.
I appreciate your feedback on the subject.
I use the title tag which is believed to be voice readable.
I try to use text for links and only use images for design with color blindness in mind.

Regards
maz
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Maz I think I told you this before. In your menu items, you have title defined. As in title=Products....just so you know this doesn't do anything for the menu. When the menu renders, it parses up the aI string and if it sees any keywords it recognizes, it uses them, and title is not one of them. To double check this, I pulled up the HTML generated by the menu (Not view source, the thing I used shows all the DIVs that comprise the menu) and there is nothing that pulls your titles along into the menu. The code ignores any keywords it doesn't understand, title being one of them. You can leave them in there, but they aren't doing anything, I just thought I would let ya know.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: ADA Compliance

Post by John »

DMLCo wrote:Just as an FYI for folks in the USA: this is a crucial feature, as if you are using image based menuing and you _don't_ include ALT tags, your site is essentially non-navigable by the software used by vision-impaired users.

It also is no longer ADA Compliant, which may or may not matter ...
Trust me - we DO know and care. Andy has stated a number of times that this system WILL be 508 compliant when it is complete (keep in mind, we are still in essentially beta with v5).

Have you tried the imagealt as Andy suggested? We always appreciate feedback, especially in this area, so we can make this the best and most compliant system available.
John
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Thank you Dave :D

I replaced title with status.
And found this very useful: http://www.w3.org/TR/WD-forms-970402

maz
tomistrugar
Beginner
Beginner
Posts: 6
Joined: Wed Apr 23, 2003 7:25 am

Post by tomistrugar »

Dear All

You can see the problems I'm having at:

http://www.population.org.au/index5.html

Thanks Andy, imagealt works fine.

There are currently 4 menus on this page:

1. menu_logo.js - This has the problem with image width and height. (see source in centre of page)
2. menu_top.js - Displays Home, Support Us, etc and works fine.
3. menu_main.js - Displays Search, Populaion, etc and works fine.

4. menu_right.js - Free Bumper Stickers, etc. This menu has another problem - When screenposition is used, then top value is ignored (see source in centre of page). I tested this also on the menu_main.js by setting screenposition="left" and the menu moved to the top of the screen, ignoring top=128.

Are these two issues (1. & 4.) bugs?

I downloaded the latest menu files on 19-Sep-03.

Thanks and regards
Tomi
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

I have the same problem, top position was working before the 15th.
I also got an error message object expected, try logo header background color.
maz
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

maz wrote:I have the same problem, top position was working before the 15th.
I also got an error message object expected, try logo header background color.
maz
What did you do with the file I sent you last week? It was working fine.
John
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

tomistrugar wrote:I downloaded the latest menu files on 19-Sep-03.
RC11 v9/20/03 is now current. No idea what it fixed, however.
John
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

I feel like I'm repeating myself, the top right menu last positioned from the top on the 15th version.

The other problem was not mine the logo menu background color had 7 digits.

Regards
maz
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Yeah i see what you mean maz. John, what shes saying is her top xp menu is supposed to be right justified and float a couple pixels from the top. But because she has the 'right' attribute in the menu, its ignoring the top value. See her code...

Code: Select all

with(milonic=new menuname("xtopmenu")){
style=xptopmain;
top=50;
screenposition="right";
....
It looks alright to me but I am still unsure as to why it continues to hug the top of the browser. It SHOULD stick to the right side (which is does) and be 50 px from the top, but its 0px from the top. But the code looks good. Not sure whats up.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

OK, now I got it. I had been concentrating more on her missing scroller before.
John
tomistrugar
Beginner
Beginner
Posts: 6
Joined: Wed Apr 23, 2003 7:25 am

Post by tomistrugar »

I believe I have found the bugs that caused the original problem reported here. See my post

viewtopic.php?p=11084

Regards
Tomi
Post Reply