Member Avatar for sonicx2218

Had a question before that was partially solved. I'm having trouble getting just one part of it to work.

preload = new Element('iframe', {
                    'src': URL,
                     'id': mediaId,
                     width: mediaWidth,
                     height: mediaHeight,
                     scrolling : 'no',
                     'frameborder': 0
                    });
                preload.style.visibility = 'hidden'; 
                startEffect();
            }

So my issue is the preload.style.visibility = hidden.
I'm trying to make it so iframe is hidden until completed. I think Onload is the right command for that. So what is the equivalent to the preload.style.visibility = 'hidden'; line to get it to work? Thanks!

Member Avatar for sonicx2218

Quick note guys: I found out that my program wasn't updating so the preload.style.visibility = 'hidden'; did actually work. The issue is using an ONLOAD function to make it visible. I don't know how to phrase it.
I know it's preload.style.visibility = 'visible';
But I don't know how I incorporate onload to it

function startEffect() {
//add:
preload.style.visibility='';//here
//and see if it works the way you need it.
        if (mediaType == "img"){...
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.