Developer/Designer Notes

Archive for the ‘svg’ Category

DHTML Programming

Posted by Kiran Mova on June 29, 2007

I am currently reading Jeremy Keith’s Bulletproof Ajax and he says..

“There is a disturbing trend among “serious” programmers to treat markup as a low-level technology that should be abstracted away from the developer. I couldn’t disagree more.”

With the recent buzz about web 2.0 and rich internet client interfaces, it is time to re-align the view on programming with scripting languages and watch out for the wonders you can do with php, javascript, css, svg and html..


Posted in css, html, javascript, svg | Leave a Comment »

SVG DOM access results in “Access Denied” in IE

Posted by Kiran Mova on March 22, 2007

Is the JavaScript access to the SVG DOM embedded in an iFrame resulting in “access denied?”. Better yet, was it working in IE6 and stopped working now?

Check if your PC has the following microsoft patch installed :  kb925454. (On XP Service Pack 1 or Service Pack 2). This patch fixes some of the vulnerabilities in cross-domain scripting. But it affects badly the pages that make extensive use of iframes and cases where parent frame needs to access the contents of the iframes using DOM.

I understand, there are valid reasons for doing this. But now that made me to look for alternative approaches for designing my page. My page consists of an iFrame that has an SVG object in it. From the parent window, I need to access the elements of my SVG and modify them.

IE throws an “access denied” when it sees – “document.iframeobj.document.embeds[]..” It doesn’t allow me to inspect the iframes document, even when the SVG object embedded is coming from the same domain. (It got to my nerves.)

Then I found this article at the Adobe’s SVG forum archive – “Problem with Microsoft Internet Explorer KB925454 patch” (Sorry, can’t provide a link, that won’t break. I accessed the google cache page to read the post. Adobe requires the users to be logged in to read it. Why!!)

The reply to that problem showed me a solution with the infamous “EMBED” tag.

For now, I got my page to work with EMBED tags, but it won’t be long before I need to shift to a standard tag like “OBJECT”. I am yet to explore the possibilites with the object tag. If you are interested, check this article at A List Apart

One disadvantage of the EMBED tag is that, I couldn’t change the “src” attribute of the tag at run time. Well, not quite right. The IE allowed me to change the value, but it made no difference.

Also, I came across something called HTA – HTML Application. It probably is a valid approach if you don’t need to access the HTML pages over the web.

Posted in coding, html, javascript, svg | Leave a Comment »