[Pro] SVG Image Action -- Suppress ActiveX Warning

In my quest to make parts of my site look better on Retina displays, I’ve found that a splattering of SVG graphics works well. The SVG Image action includes GIF or JPEG fallback for older versions of IE that don’t support SVG, while all other browsers get to enjoy the SVG graphic. But alas, I’m finding that IE8 coughs up an ActiveX warning and beeps on every single page that I have used the SVG Image action. (I’ve read that such was introduced in SP2 on WinXP.)

I want to suppress that warning! But the question is how.

My thinking was to use Conditional Statements like the following (where “Dshock” is the name of my graphics box in Freeway, and “052_Dshock.svg” is the name of my SVG graphic):

<!--[if !IE ]>
<div id="Dshock" style="position:absolute; left:452px; top:73px; width:61px; height:75px; z-index:15">
<object type="image/svg+xml" data="052_Dshock.svg"></object>
</div>
<![endif]-->
<!--[if lt IE 9]>
<div id="Dshock" style="position:absolute; left:452px; top:73px; width:61px; height:75px; z-index:15">
<img src="dshock.gif" border=0 width=61 height=75 alt="" style="float:left" title="">
</div>
<![endif]-->
<!--[if gte IE 9]>
<div id="Dshock" style="position:absolute; left:452px; top:73px; width:61px; height:75px; z-index:15">
<object type="image/svg+xml" data="052_Dshock.svg"></object>
</div>
<![endif]-->

In the above code, the first condition is for all browsers other than IE. The second condition is for IE versions 6/7/8. And the third condition would be for IE9/10, both of which support the native display of SVG. But when I hand-edit my web page to include those 3 conditional statements, the fallback graphics display in IE6/7/8 just fine but nothing at all displays in Chrome or Firefox or Safari or IE9/10.

So clearly I do not understand how to implement IE conditional statements.

All I want to do is suppress the stupid ActiveX Warning in IE8 (or lower). Does anyone have an idea on how to accomplish that feat?

Thanks,

James Wages


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

<!--[if lt IE 9]>

Means for Internet Explorer lower or equal to 9

So to target 8 and below you want

<!--[if lt IE 8]>

Similarly

<!--[if gte IE 9]>

Means greater than or equal to IE9 - so in your example you have contradictory statements.

Personally I think I would use a class attribute and do it in a Style block in before keeping the layout code separate from the style code.

Something like

<!--[if lt IE 8]>
<style type="text/css">
#Dshock {
background-image:url(Resources/dshock.gif);
background-repeat:no-repeat;
background-position:center;
}
</style>
<![endif]-->

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry James - just re-read your post and realised I read it wrong!

You were correct to write

<!--[if lt IE 9]>

Meaning less than 9

But the rest of my post stands

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Dave, I obviously don’t want to hack the SVG Image Action, nor do I wish to use Source Code Snooper to hack every single one of my web pages. So your suggestion of using “a Style block in before ” is sound. However, if I cannot even get the line Conditional Statements to kill the stupid IE8 ActiveX warning, I don’t see how I can expect to get the same code to function in Style Block form.

My point is that the code I have right now should work, in theory. But in reality it isn’t working in any of the modern browsers. That’s the problem.

–James Wages


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Would anyone else care to comment?

Where there’s a will, there’s a way. I have the will. I just haven’t found the way.

Thanks,

James Wages


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

My point is that you are trying to change the Html structure of your page with conditionals whereas mine only alters style declarations.

I know that altering styles in this way works but I dont know if your method is valid or not.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

My method is not valid insofar as it doesn’t work!

I’ve tried a lot of things, but the only thing that keeps IE 8 from displaying that stupid active text message is to completely hide any reference to the SVG from IE8. My code accomplishes that task, hiding the SVG from IE8, but the problem is that IE9 and IE10 and Firefox and Chrome and all modern browsers are refusing to display the SVG. In fact, the modern browsers dispkay nothing at all, except a big gaping hole in my web page.

All I want to do is prevent IE 8 from beeping at users and displaying that stupid active X warning message at the top of the browser window, only because it chokes on seeing an SVG on the page.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Can you share a link so that I can try with IE8

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m at home on my iPad right now, and I need to leave for the office, but what I can say is that any page with an SVG on it will result in the IE8 ActiveX error message and beep. I forget which of my test web pages have the IE conditional statements on it (I’ll have to check that when I get to the office), but here is one page on my site that has an SVG:

http://visionsecurity.jp/en/test/sensors/318_052.html

In researching the subject, I found that some other people experienced the beep and error message in IE 7 too, but I am not saying that IE 7. I am only saying it and IE8. Other people are saying that the browser settings have something to do with it, but I cannot expect all of my web visitors to alter their browser settings only to prevent this beep an error message from displaying. I want to be able to suppress the error, without having the user to change any settings.

Thanks.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Not getting it on that page.

I will try again later with any other links you can provide.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you don’t get the stupid ActiveX warning message and beep on that page in my site, you won’t get it on any page. On my WinXP PC running IE8, I get it on any page (from any site) which has an SVG on it.

I could make a video to show you, but suffice it to say, what I’ve told you is true.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

While you guys have your IEs warmed up, try this page, which is a cut-down test page with nothing except a single SVG embedded on it.

http://scripty.walterdavisstudio.com/svg.html

See if you get the error there. This is an HTML5 page with no styles or script or anything, just the standard HTML5 “shiv” for IE. Just to get a baseline for what IE will tolerate.

The “beep” I believe may be a leftover from the EOLAS patent, so the solution may be to inject the SVG into the page with JavaScript, just as we used to do with QuickTime back in the day (when IE 8 was a valid and current browser). The EOLAS settlement was thrown out or expired or something – I recall that IE no longer requires you to inject QuickTime objects with JavaScript, but I don’t recall at what version that started being possible.

Walter

On Apr 22, 2013, at 6:09 PM, DeltaDave wrote:

Not getting it on that page.

I will try again later with any other links you can provide.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s a screen shot of the message/error that appears when I try to open your page, Walter:

There is a beep sound too. I would have made a video of that, but I know about your slow net connection. You need Google Fiber! :slight_smile:

Anyway, that Japanese basically just says:

“On this website you need Adobe Systems ‘SVG Viewer 3.0 for Netscape’ add-on. For more info on add-ons click here…”

The mention of “Netscape” in IE8 is hilarious!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Google to the rescue (literally – they developed this library): http://code.google.com/p/svgweb/downloads/detail?name=svgweb-2011-02-03-Lurker-Above.zip

The same page re-worked to include this library:

http://scripty.walterdavisstudio.com/svg/

Walter

PS: Do go back to look at the original link – I realized while making this demo that I had neglected to upload the png and SVG graphics along with the HTML, so that wasn’t a fair test. See if there is anything working when you visit the original version too.

On Apr 22, 2013, at 9:00 PM, JDW wrote:

Here’s a screen shot of the message/error that appears when I try to open your page, Walter:

http://kiramek.com/21test95/walters_svg_IE8_warning.png

There is a beep sound too. I would have made a video of that, but I know about your slow net connection. You need Google Fiber! :slight_smile:

Anyway, that Japanese basically just says:

“On this website you need Adobe Systems ‘SVG Viewer 3.0 for Netscape’ add-on. For more info on add-ons click here…”

The mention of “Netscape” in IE8 is hilarious!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I am using IE8 but with Win7 so it may not be a fair representation of your visitors’ systems James.

However I get no errors on either of Walter’s pages either.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

After your change, Walter…

The GOOD: Your SVG now displays!

The BAD: The stupid BEEP & Warning still appear.

The very existence of an SVG is causing the Beep and Warning. I am just curious how to suppress that Beep and Warning, even if it means using a technique that will not display the SVG at all, using a fallback GIF image instead. I thought my conditional statements would do that, but they end up displaying the fallback in IE8 (and suppress the Beep and Warning), but all newer browsers get nothing… nada… el zippo.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m quite certain you have to be using WindowsXP, Dave.

Sadly, a huge number of our web visitors here in Japan are still using XP. They heard about how bad Vista was so they didn’t upgrade then. Then Win7 came out and they asked themselves what they would gain by switching. Then they learned that most of their Japanese proprietary software wouldn’t work right on 7, so they stayed with XP. Then Win8 came out and all the bad press has made it another Vista.

Heck, I think the Japanese will still be using XP 10 years from now. It’s really scary here. I do all I can to get these people mental help by moving them to the Mac. Works great on end users, but business folks are hard nuts to crack. Too much proprietary business software here that only works in XP (at least, the software vendors only support XP).

So it’s not a matter of me living in the past. It’s a matter of me having to endure pain and suffering to ensure our site is viewable and without unnecessary beeping and warnings for our primary viewer base.

Any further thoughts you gentlemen may have would be greatly appreciated.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I still think that my method of doing the conditionals is the way to go - however it is really late here and I do not have time to make a test page.

If i get some time tomorrow I will give it a go.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

See if your beeping will stop with this one:

http://scripty.walterdavisstudio.com/svg/js.html

I’m using a simple Prototype script (inside a conditional comment) to look for any object tags that contain embedded images and replace the object with the image. I don’t have IE 8 running here, so I can’t test it right now, but your day is just getting going there, so I figure you have a chance. View source, it’s all inline code.

Walter

On Apr 22, 2013, at 9:26 PM, DeltaDave wrote:

I am using IE8 but with Win7 so it may not be a fair representation of your visitors’ systems James.

However I get no errors on either of Walter’s pages either.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Nope. IE8 on WinXP gives be the annoying “be-deep” sound and warning message.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options