/    Sign up×
Community /Pin to ProfileBookmark

Dynamic Image Display

Hi,

I am experiencing an IE bug, which does not show Images dynamically with either

[CODE]getElementById(‘div’).innerHTML = ‘<img src= …>’ ;[/CODE]

or

[CODE]
getElementById(‘image’).src = ‘http://……’;[/CODE]

This applies to anywhere within the page.

Actually image is there, it size (dimensions) get allocated ans consumed by browser. But no image not found message or ALT message displayed.

With firefox everything works.

How can I solve this… I know and I have used above methods in other development, but those do not work here.

Thanks and Best Regards

Indunil

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@GUIRauthorJan 21.2009 — Hi,

I am experiencing an IE bug, which does not show Images dynamically with either, using Javascript

Code:
[CODE]
getElementById('div').innerHTML = '<img src= ...>' ;
[/CODE]

or

Code:

[CODE]getElementById('image').src = 'http://......';[/CODE]

This applies to anywhere within the page.

Actually image is there, it size (dimensions) get allocated ans consumed by browser. But no image not found message or ALT message displayed.

With firefox everything works.

How can I solve this... I know and I have used above methods in other development, but those do not work here.

Is this can be happen with a conflict with loaded CSS.

Thanks and Best Regards
Copy linkTweet thisAlerts:
@two4god07Jan 21.2009 — hows your doctype? I don't know if that has anything to do with anything, but I know everytime I have a problem, and did everything right, there's always an issue with the doctype.
Copy linkTweet thisAlerts:
@FangJan 21.2009 — Both methods work in IE provided they are prefixed with [COLOR="Blue"]document.[/COLOR] and relevant characters are changed to entities.

Please do not cross post.
×

Success!

Help @GUIR spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...