Firefox onLoad img

K

Kara Johnson

Ran into a little trouble, I have an image that is generated by a perl
script, but my take 4 or 5 seconds to be generated so I thought a please
wait message would be nice.

The code works just fine on IE, but Firefox does not. On Firefox all I
get is the "please wait message" and when the image is done being
generated I get an empty space the size of the image.

I can set the visibility to visible on the image div and the image
appears just fine.

Thanks for any help with this, removed html tags to not be flagged as
spam.

Kara


function showImage() {

document.getElementById('wait').style.visibility="hidden";
document.getElementById('mypage').style.visibility="visible";

}

div id="wait" style="visibility: visible; font-size: 14pt; color: red;"
Loading... Please Wait
/div

div id="mypage" style="visibility: hidden;"
img onLoad="showImage();" src="/graphs.pl?gid=1"
/div
 
T

Tom

On 03 Dec 2007 19:22:53 GMT, Kara Johnson wrote...
Ran into a little trouble, I have an image that is generated by a perl
script, but my take 4 or 5 seconds to be generated so I thought a please
wait message would be nice.

The code works just fine on IE, but Firefox does not. On Firefox all I
get is the "please wait message" and when the image is done being
generated I get an empty space the size of the image.

I can set the visibility to visible on the image div and the image
appears just fine.

Thanks for any help with this, removed html tags to not be flagged as
spam.

Kara


function showImage() {

document.getElementById('wait').style.visibility="hidden";
document.getElementById('mypage').style.visibility="visible";

}

div id="wait" style="visibility: visible; font-size: 14pt; color: red;"
Loading... Please Wait
/div

div id="mypage" style="visibility: hidden;"
img onLoad="showImage();" src="/graphs.pl?gid=1"
/div


I think the "onLoad" event can be used in a BODY, IFRAME or IMG tag, but I don't
think they can be triggered from DIV

Tom
 
K

Kara Johnson

Found the problem, was referencing the wrong path for the js file.
Funny IE kept finding it and I was not receiving errors in the
javascript console.

Everything is working as expected, thanks for the help.

Kara
 
E

Evertjan.

Kara Johnson wrote on 04 dec 2007 in comp.lang.javascript:
Found the problem, was referencing the wrong path for the js file.
Funny IE kept finding it and I was not receiving errors in the
javascript console.

Everything is working as expected, thanks for the help.

[please always quote on usenet]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top