views:

75

answers:

3

When hovering the mouse over images IE pops up a little toolbar that suggests saving, printing and so on.

Here's a pic of this:

alt text

I need to accomplish this with JavaScript.

A: 

try following on any event u want to consider:

  onmouseover="return false;"

or

     onmouseover="javascript:void(0);"
Sarfraz
Yeah, I did so, but mouseover fails somehow.
Ale Anderson
No this won't work. It has to have the gallerimg="no" tag.
jeffamaphone
+4  A: 

This only works if the image is embedded in a web page.

If you do NOT want an image to show the toolbar, then use GALLERYIMG="no" in the img tag.

If you DO want an image to show the toolbar, then use GALLERYIMG="yes" in the img tag.

http://msdn.microsoft.com/en-us/library/ms533774%28VS.85%29.aspx

Martijn Dijksterhuis
According to the page you linked to, that attribute is obsolete.
titaniumdecoy
[Cavaet: I don't have IE7 installed] A websearch tells me that IE7 does not have a toolbar, so its no longer a problem as it was in IE6. Your comment about the attribute now being obsolete in IE7 is thus indeed correct.
Martijn Dijksterhuis
This is the only way to do it. You can't do it in Javascript. If the GALLERYIMG attribute isn't present at DocumentComplete, it won't be processed. The tag is obsolete because this feature was removed in IE7. As the developer who both implemented it and removed it, I apologize. I was an intern, and I implemented what was in the spec. I promise to never do it again.
jeffamaphone
Oh, alternatively you can insert the img dynamically after DocumentComplete fires and then the code won't know about the img.
jeffamaphone
+2  A: 

Use this:

<meta http-equiv="imagetoolbar" content="no">

(Source)

Aziz
I need to do this within JS.
Ale Anderson