Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
pkimelman
Posts: 4
Registered: ‎01-17-2010
My Device: 8900

CSS Background image disappears after javascript changes an unrelated img

I am testing with my 8900 using 4.6.1.114 and the standard browser. The site is www.jeudejupe.com. It renders correctly at 1st, but when a timer based javascript function replaces the image source of an unrelated image, both "menu" bars disappear (I use the term menu loosely since it does not use popdown menus). These are just a "li" list using CSS to put in a background image.

I can confirm it is only the JS because I have an exact copy called test_index.html that only has the JS disabled and it works fine.

Note that the JS does work (images change every 8 seconds) so it is not like it is trashing the data.

I have tested this on FF, IE6, IE7, IE8, Opera, Opera-mini, Safari, Safari-iphone, Wii, PS3, and a couple other phone browsers (what is in Nokia smartphones and Palm Pre). This is the only one giving me this trouble.

Anyone know what may be going on?

If not, I will have to disable the JS if I detect BB I guess.

Thanks, Paul

New Developer
pkimelman
Posts: 4
Registered: ‎01-17-2010
My Device: 8900

Re: CSS Background image disappears after javascript changes an unrelated img

By the way, I upgraded the OS and it did not fix this.

More importantly, it seems to be wiping out the links altogether and not just making the background disappear. But, no idea why.

New Developer
pkimelman
Posts: 4
Registered: ‎01-17-2010
My Device: 8900

Re: CSS Background image disappears after javascript changes an unrelated img

I have reduced to a tiny page called www.jeudejupe.com/test_bb.html that is a total of 54 lines of CSS,HTML,JS and shows quite simply that as soon as it wrotes to the img.src (DOM) element, the list is destroyed for unknown reasons. Only unsupported aspect is the :hover in CSS, but that should be ignored and does not stop it rendering before the JS. Hard to see how that is not a nasty bug. Hard to see what the workaround could be.

New Developer
pkimelman
Posts: 4
Registered: ‎01-17-2010
My Device: 8900

Re: CSS Background image disappears after javascript changes an unrelated img

Actually, removed the :hover and it still fails in the same way. So, that is not the issue.