faqts : Computers : Programming : Languages : JavaScript : Forms : TextAreas/TextFields

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

19 of 160 people (12%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How dynamically change text color in a textArea

Apr 9th, 2001 23:25
minhui Chieu,


<script language="JavaScript" type="text/javascript">
<!--
function lightmark()
{							
var rg = event.srcElement
if(rg!=null) {
    var r = document.selection.createRange()
    if(r!=null) {
       r.select()
       r.execCommand('FORECOLOR','','orange') 
       }
    }
}
 //-->
</script>

above code is workable in NT but didn't work in Windows 98! why?