[Macro error: Can't call the script because the name "liveTopicsSuite" hasn't been defined.] s l a m

Click to see the XML version of this web page. rss 2.0

updated: 3/20/04; 5:38:22 PM.


activeRenderer Version 1.4 Released

Now Renders RSS Feeds - Includes New Outline Browser

[Macro error: Can't call the script because the name "liveTopicsSuite" hasn't been defined.]

>

Friday, November 1, 2002
> Outline Image Inclusion Issues

I am currently working on the main feature scheduled for version 1.3 of activeRenderer: the inclusion of images, defined as jpg, gif or png link attributes, into the outline's web page. Following is a rather technical description of the problems I'm experiencing doing this in Javascript.

I'm creating an image type element in an HTML 4.01 page with
var includedImg = document.createElement ('img');
I'm setting various attributes, then loading this image from an outside source, defined in the 'url' string :
includedImg.src = url;
At this point, I need to consider some image resizing options before appending this image into the page by using :
expandedNode.appendChild (includedImg);
The resizing decision depends on 2 factors :
  • The width of the image I've loaded into IncludedImg.
  • The width of the containing 'div' element defined by expandedNode.
First, to find the width of the image, I tried :
includedImg.getAttribute ('width');
Understandably, this only returns a non 'null' value if and when the actual image file is loaded into the browser's cache.

My first problem is that I do not currently know a standard, cross browser method of finding out whether the image is fully loaded before querying its width attribute.

Second, to find the width of the containing div, I relied on the abstract view model as defined by the W3C :

document.defaultView.getComputedStyle (expandedNode, '').getPropertyValue('width');
This works fine with all versions of Mozilla. Unfortunately, Microsoft Internet Explorer relies on a different, proprietary model, using the currentStyle property of the element. So I tried something like this when testing for MSIE :
expandedNode.currentStyle.width;
This returns 'null' with MacOS X MSIE 5, and a disconcerting 'auto' string with Windows MSIE 5/6.

So my second issue is finding a way to properly use the currentStyle property, or any other relevant property, to retrieve this elusive width information with MSIE.

If anyone reading this has a clue, I'd appreciate some feedback.

[Macro error: Can't call the script because the name "liveTopicsSuite" hasn't been defined.]  Permalink 3:05:07 PM .
[Macro error: Can't call the script because the name "liveTopicsSuite" hasn't been defined.]


bookmarks
 activeRenderer
 enhancedAggregator
 k-collector
 Neighborhoods
 HTML

Search
radioScan titles, or full text search:

how this works

November 2002
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Oct   Dec

© copyright 2004
by Marc Barrot

member of

The USENIX Association

and

SAGE, The System Administrators Guild