17 replies [Last post]
gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 2 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9743
Points: 3822

Will the Eolas suit affect your sites? Did your world as MSFT knows it end today?

See also http://msdn.microsoft.com/library/?url=/workshop/author/dhtml/overview/activating_activex.asp

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 1 year 13 weeks ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9668
Points: 801

The world as MSFT knows it will end today

Holy hell Laughing out loud

Quote:

Never before have web standards been so important. Web developers who build their sites using CSS, Javascript, and XHTML are going to come to work on April 11 just like any other day. Developers who build websites entirely in Flash won’t come to work at all on April 11 — they’ll still be there from the night before.

Good stuff!

Verschwindende wrote:
  • CSS doesn't make pies

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 45 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

The world as MSFT knows it will end today

Flash site builders

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

HellsBells
HellsBells's picture
Offline
Leader
Bedford, UK
Last seen: 11 years 29 weeks ago
Bedford, UK
Joined: 2004-04-07
Posts: 851
Points: 0

The world as MSFT knows it will end today

The fix they mention basically seems to be using using a JS file to call the "thingies" instead of directly embedding them in the page - that would seem a fairly.... crappy way of getting round it - what about when JS is off? Is that the only way round it?

I'm amazed I haven't seen more panicky posts on various fora about this in the run up to it happening!

My strategy is so simple an idiot could have devised it!

"Also, your CSS (no offence) makes me want to gouge my eyes out with a rusty spoon" - TPH

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 2 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9743
Points: 3822

The world as MSFT knows it will end today

I can't claim to understand much about this. I, too, went hunting for more from the Flash community, but found zip. Are they so out of the caring mode that they don't read the news?

I think the problem is based on using Active-X within the document via the classid thingie. If that's the case, does using the object element correctly with the type and data attributes work properly in an updated IE? I can't check because MS has dropped support for IE on 98x at sp1. (Yeah, right! Officially, it will be a few months yet—BS. {I feel no need to upgrade[?] until one of my old Win boxes dies.})

Has anyone tried it yet?

HB, I don't think it matters much to MS. If you disable javascript, it disables Active-X, too; at least on my IEsp1.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

HellsBells
HellsBells's picture
Offline
Leader
Bedford, UK
Last seen: 11 years 29 weeks ago
Bedford, UK
Joined: 2004-04-07
Posts: 851
Points: 0

The world as MSFT knows it will end today

Sooo - (forgive my slowness with this as I don't use flash on my sites) do I have this right:

1. Flash animations will still run as they did without alterations.
2. You won't be able to interact with Flash nav or embedded media straight off the bat without "activating" it by clicking on a confirmation message of some kind.
3. The way round it seems to be using document.write to write the files into the page rather than having them "hard-coded" into the page.
4. This won't work with JS off but then it wouldn't have worked anyway previously as ActiveX would have been switched off too with all scripting.

Just so that I know what to say when the truth dawns on the Flash developers!

Does using any of the Flash Satay or UFO methods help at all?

Final thing - document.write won't work in properly served XHTML - so is there an alternative for that?

Edit: Just came across this method - any comments welcome:

External JS file:

var objects = document.getElementsByTagName("object");

for (var i=0; i<objects.length; i++)
    objects[i].outerHTML = objects[i].outerHTML;

IE conditional comment:
<!--[if IE]> <script type="text/javascript" src="fix_eolas.js" defer="defer"></script> <![endif]-->

My strategy is so simple an idiot could have devised it!

"Also, your CSS (no offence) makes me want to gouge my eyes out with a rusty spoon" - TPH

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 1 year 13 weeks ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9668
Points: 801

The world as MSFT knows it will end today

Good thing I don't, and never plan, on using Flash Wink

Verschwindende wrote:
  • CSS doesn't make pies

HellsBells
HellsBells's picture
Offline
Leader
Bedford, UK
Last seen: 11 years 29 weeks ago
Bedford, UK
Joined: 2004-04-07
Posts: 851
Points: 0

The world as MSFT knows it will end today

I agree with you TPH - that said, I've had to include a flash animation in a rebuild of a site (used satay to make it valid) and as discussed I've had clients asking recently about embedding video clips in sites - so it's still a good idea to figure out "good" methods of doing this stuff Laughing out loud

My strategy is so simple an idiot could have devised it!

"Also, your CSS (no offence) makes me want to gouge my eyes out with a rusty spoon" - TPH

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 7 years 8 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

The world as MSFT knows it will end today

Some notes:

(1) Flash satay makes no difference
(2) Its not really a big deal. The flash element gets a black outline when you hover over it and a tool tip appears saying click to activate.

I'll try your JS. I tried something similar last night

  function init() {
			var objects = document.body.getElementsByTagName("object");
			
			for (var i=0; i<objects.length; i++) {
				var parent = objects[i].parentNode;
				var html = parent.innerHTML;
				
				parent.innerHTML = html;
			}
	}

It didn't work, the script ran and replaced each object with itself and ended up with blank spaces where the flash used to be. It appears IE won't instantiate an active-x object from regenerated html. As a test, I ran the script in Firefox and it worked fine.

/edit, your script did exactly the same thing.

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 1 year 6 weeks ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

I don't see this?

So I did the april 11 upgrade to IE and accessed a site that has the
<object> and <embed> tags and I didn't have manually click and update each instance... what's the deal with this anyway?

Unless I didn't get the right upgrade to IE...

oh... edit here... I just went to one that had like a tooltip that required me to activate... weird

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 7 years 8 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

The world as MSFT knows it will end today

Some more notes on this.

- IE seems to require that the javascript is run by an external script. Having the exact same code executed by a script included directly in the same page will not work.

- IE seems to know if the original node/inner html/outer html comes from the page itself. So attempting simple replacements with self will not work.

A quick method of converting a page with flash to a script based page is to post process a php output buffer.

<?php include('path/to/flash.php'); ob_start(); ?>
<!DOCTYPE ...>
<html ...>
<head>
...
<script type="text/javascript" src="path/to/script/flash.js"></script>
...
</head>
<body>
... your html which includes objects ...
</body>
</html>
<?php flash(); ?>

where flash.php contains

function flash() {
  $str = ob_get_clean();
	
  $ptns = array('/\n/','/\s+/','#<object.*?</object>#');
	$replacements = array(' ',' ','<script type="text/javascript">flash(\'$0\');</script><noscript>$0</noscript>');
  $str = preg_replace($ptns, $replacements, $str);

  print($str);	
}

and flash.js contains

function flash(str) { document.write(str); }

The php won't work with nested objects, but it works just fine with flash satay style objects. I am not certain, but using markup like the above is likely to add some width to IE elements, possibly equivalent to an extra space or two.

An alternative is to create a php page which can include html pages and place the two php lines in that script and then run the script over each page saving the results. Note this will result in a page will all new lines and multiple spacing removed.

<?php
function flash() {
  $str = ob_get_clean();
	
  $ptns = array('/\n/','/\s+/','#<object.*?</object>#');
	$replacements = array(' ',' ','<script type="text/javascript">flash(\'$0\');</script><noscript>$0</noscript>');
  $str = preg_replace($ptns, $replacements, $str);

  print($str);	
}

ob_start();
include($_REQUEST['page'.html);  /* keep private, very insecure */
flash();
?>

for those with php4 < 4.3, also include in the following your php script. If you're still running PHP3, you don't have access to output buffering so this code won't help you.

if (!function_exists('ob_get_clean')) {

function ob_get_clean() {
  $ob = @ob_get_contents();
  @ob_end_clean();
  return $ob;
}
}

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 7 years 8 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

The world as MSFT knows it will end today

If anyone is still paying any attention to this thread ...

One last point.

<noscript> is a flow element, so it can't contain an <object> directly - not in valid (x)HTML. To overcome this insert a <div> between the two and style the <div>

noscript div { display: inline; }

if you use <div> within the <object> (which is allowed) then you'll need to give the noscript <div> a class (I guess "noscript" would work fine).

Also, there are several block tags which can only contain inline elements, e.g. hx, p, dt. These need special treatment if they contain <object>s.

Updated php function from above

function flash() {
  $str = ob_get_clean();
   
  $ptns = array('/\n/','/\s+/','#<object.*?</object>#');
  $replacements = array(' ',' ','<script type="text/javascript">flash(\'$0\');</script><noscript><div>$0</div></noscript>');
  $str = preg_replace($ptns, $replacements, $str);

  print($str);   
}

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 45 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

The world as MSFT knows it will end today

a lone voice in the wilderness wrote:
If anyone is still paying any attention to this thread ...


Nah we were just letting you ramble on quietly to yourself Smile

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 16 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

The world as MSFT knows it will end today

So; what's this Eolas thing again? 8-[

Life's a b*tch and then you die!

HellsBells
HellsBells's picture
Offline
Leader
Bedford, UK
Last seen: 11 years 29 weeks ago
Bedford, UK
Joined: 2004-04-07
Posts: 851
Points: 0

The world as MSFT knows it will end today

Hugo wrote:
a lone voice in the wilderness wrote:
If anyone is still paying any attention to this thread ...


Nah we were just letting you ramble on quietly to yourself Smile

Ahhh bless!

My strategy is so simple an idiot could have devised it!

"Also, your CSS (no offence) makes me want to gouge my eyes out with a rusty spoon" - TPH

loungepenguin
loungepenguin's picture
Offline
Enthusiast
Brighton UK
Last seen: 7 years 51 weeks ago
Brighton UK
Joined: 2005-01-11
Posts: 213
Points: 20

The world as MSFT knows it will end today

Does anyone know of a quick and easy way to modify the Flash Satay Method to stop this annoyance?

Thankfully I have only used it on one site but I still want to avoid embedding with JS (I think I'll start doing this in th efuture though)

thanks in advance

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 7 years 8 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

The world as MSFT knows it will end today

There is no way to overcome it without javascript. I include a quick and dirty script to modify existing code in one of my earlier posts.

technossomy
technossomy's picture
Offline
Enthusiast
Last seen: 5 years 10 weeks ago
Timezone: GMT+1
Joined: 2004-06-09
Posts: 260
Points: 8

The world as MSFT knows it will end today

thepineapplehead wrote:
Good thing I don't, and never plan, on using Flash Wink

I have not installed the Flash plugin in any of my browsers, which effectively means I will not be able to get past the first page of about 15% of the sites I visit. The way I see it is that this is the problem of the designer, not the user.

Best

Tech