tags:

views:

47

answers:

3

Hello-

I'm looking for Javascript that will fire when page opens and sets Image1 visibility to true.

Thanks

+2  A: 

If you are referencing the CSS visibility property:

window.onload = function() {

    document.getElementById( 'Image1' ).style.visibility = "visible";`

};

or the display property:

window.onload = function() {

    document.getElementById( 'Image1' ).style.display = "block";

};
Jacob Relkin
+1  A: 
<script>
window.onload = function() {
    document.getElementById("Image1").visibility = "visible";
}
</script>
karim79
+2  A: 

If you want it to occur right away utilize the document.onload method. I.e.

document.onload = loadFunc;

function loadFunc() {
document.getElementById( 'Image1' ).style.display = "block";
}
CogitoErgoSum