I want ONCHANGE and ONBLUR events to fire.

  •  07-22-2005, 2:23 PM

    I want ONCHANGE and ONBLUR events to fire.

    This is very easy to do with any other tool  for a std textarea html control you can add ONBLUR="alert('Hello World');" and when the user types data into the text area and then clicks somewhere else on the page the Hello World alert pops up.
     
    The standard method in vb for asp.net would be to
    txtComment.Attributes("onblur") = "alert('Hello World');"  but that does not work with the cute editor. 

    Can someone tell me if there is a way to do what I think should be very simple?

    Thank you. 
     
    Another post had the following code as an example which works fine for ONCLICK but not for any other event such as ONBLUR:
     
    function test ()
    {
    var editor1=document.getElementById('<%=txtComment.ClientID%>');
    var editdoc = editor1.GetDocument();
    editdoc.onclick=helloworld;
    }
    function helloworld()
    {
    alert("Hello World");
    }
     
     
    Filed under:
View Complete Thread