Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE update layer

Status
Not open for further replies.

michelledebeer

Programmer
Oct 26, 2001
22
0
0
SE
I want to update a layer without reloading the page.

I have previously recieved this function, but it only works with Netscape.

How can I make it work for IE?

function print_picture(picture) {
with(document.layers['myLayer']) {
document.open();
document.write('<img src=&quot;'+picture+'&quot;>');
document.close();
}
}

// Michelle
 
Code:
function print_picture(picture)
{
     if(document.layers)
     {
          with(document.layers['myLayer'])
          {
               document.open();
               document.write('<img src=&quot;'+picture+'&quot;>');
               document.close();
          }
     }
     else
     {
          mylayer.innerHTML=&quot;<img src='&quot;+picture+&quot;'>&quot;
     }
}
Be sure that the mylayer layer has an id of 'mylayer'. jared@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top