Archive for the 'HTML/JavaScript' Category

SWFObject 2.0 not returning userAgent in IE6 (anyone else encounter this?)

UPDATE: The new SWFObject 2.0 (Release Candidate 2) resolved this issue. The examples below should now give you the browser agent info when using IE6…

The one caveat, Firefox on XP needs wmode to be set to either “transparent” or “opaque”, otherwise a pop-up occurs.

******

Screenshot…
http://www.easternstorm.net/sassie/useragenttest/versionresults.jpg
On the left side observe IE6 loading the same swf, embedded in
standard Flex 3, SWFO 1.5, SWFO 2.0. Please note that that in SWFO
2.0 we receive “null”.
Now, the left two columns shows several other browsers loading the 3rd
template:
http://www.easternstorm.net/sassie/useragenttest/useragenttestSWFO20….
Note that it is working fine on Firefox XP, Safari 3 XP, Opera XP,
Firefox OSX, Safari 3 OSX. The only other exception being Safari 2,
which has known issues with externalInterface as I recall.
So clearly there is something not quite right with SWFObject 2.0
running IE6
***
Here are the three embed templates:
http://www.easternstorm.net/sassie/useragenttest/useragenttest.html
http://www.easternstorm.net/sassie/useragenttest/useragenttestSWFO15….
http://www.easternstorm.net/sassie/useragenttest/useragenttestSWFO20….
***
Source code of example:
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml
layout=”absolute” viewSourceURL=”srcview/index.html”>
<mx:Script>
<![CDATA[
private function Test():void{
Debug.text = "<<" + ExternalInterface.call("function getBrowser()
{varBrowser = ''+ navigator.userAgent;alert(varBrowser);return
varBrowser;}") + ">>";
}
]]>
</mx:Script>
<mx:VBox x=”10″ y=”10″>
<mx:Button id=”btnTest” label=”Click to View userAgent Info”
click=”Test()”/>
<mx:TextArea id=”Debug” width=”450″ color=”Navy” borderColor=”Red”/>
</mx:VBox>
</mx:Application>

The Nightmare that is “_blank”: Part II (resolved???)

UPDATE: I have found the issue with IE & pop-up blocking. It was not in fact the fault of SWFObject. Rather, the issue was a particular parameter entry: wmode=”transparent”

Yes, the simple removal of this entry caused IE’s pop-up blocking to cease. It appears I finally have a working solution - I tested on: XP (IE6, Firefox, Safari 3, Opera) & OSX (Firefox, Safari 3, Safari 2). The only caveat now being that the use of wmode=”transparent” causes IE to pop-up block.
Okay, I am putting this out to all of my readers…


I’ve almost got every browser working for my “_blank” clicks. The final exception is that on IE clicking is triggering a pop-up blocker. Surprisingly, it is not my code that appears to be the issue - or at least not directly - rather, it appears to be caused by the use of SWFObject to embed the .swf file. (We use SWFObject for our .swf embedding for a variety of reasons.)

Below are three links to my “Example 2″ , each using a different loading method. Standard as generated by Flex, SWFObject 1.5, & SWFObject 2

http://www.easternstorm.net/sassie/example2/example2.html

http://www.easternstorm.net/sassie/example2/example2-swfobject.html

http://www.easternstorm.net/sassie/example2/example2-swfobject2.html

If anyone can provide insight as to why the use of SWFObject is triggering the IE pop-up blocker, please, please let me know!

- The Saj

PS - Here are a few additional links on “_blank” issues. These demonstrate examples of using Callback, which I have not implemented but might consider incorporating.

Insideria

AssertTrue

Font rendering in browser platforms

We are seeing a growing trend on the web of platform diversification. There have always been a variety of operating systems and browsers on the web, but for sometime the vast majority of users have been Windows/IE. In recent years this trend has been changing, first with Firefox and now with the expanding adoption of OS X. The result is an increase in the diversity of commonly used web browsing platforms.

I recently encountered some issues relating to how fonts are rendered in different platforms. I was commented on a friend’s blog that I found it hard to read the code sections of his blog as the font rendered quite small.

Having recently moved to a Mac OS X system for development in conjunction with Parallels running Windows XP allows me to review and test several web browsing platforms from a single machine. My results are below:

Comparison of 'Courier' font on multiple browsers/OSes
(Click for view full size image!)

Note that in Safari the text is so small and choppy that it is nearly unreadable.

Comparison of 'Arial' font on multiple browsers/OSes

(Click for view full size image!)

Arial tends to be much more uniform in display size across all examples.

***

Special thanks to Jeffry Houser