View Single Post

  #2 (permalink)  
Old 01-30-2007, 07:31 PM
rachelle rachelle is offline
Senior Member
 
Join Date: Apr 2006
Posts: 122
rachelle is on a distinguished road
Quote:
Originally Posted by ashlee View Post
I am puzzled with a small question.Is it possible to alter the HTML source of a layer in Internet Explorer. If so how can one do this.

here is how you do it ...

PHP Code:
<SCRIPT LANGUAGE=JAVASCRIPT>


    function 
myClick() {
    
alert('innerHTML: ' document.all('MyID').innerHTML);
    
document.all("MyID").innerHTML '<FONT COLOR="#FF0000">this</FONT> is <B>not</B> <I>plain</I>';
    
alert('innerHTML: ' document.all('MyID').innerHTML);
}

</SCRIPT>
<P ID="MyID">this is a <B>plain</B> paragraph</P>
<FORM><INPUT TYPE="BUTTON" VALUE="Click Me" onClick="myClick()"></FORM> 
Reply With Quote