shoyeb Aziz

shoyeb Aziz

  • NA
  • 72
  • 0

Text Boxes Focusing Not Working

Apr 2 2010 7:54 AM

Hi All,
I have an application in which i have Master page and  a folder for Javascript .
In .js File i have written code

function changeSColor(txtbox1)
         { 
          txtbox1.style.background='silver';
          txtbox1.style.font='bold';
         }
     function changeDColor(txtbox1)
         {
           txtbox1.style.background='White' ;
           txtbox1.style.font='normal';
         }
in master page
i have import its reference
 <script src="JavaScript/JFocus.js" type="text/javascript"></script>
now in my default page i have added master page and
at page load
  txtQtyPu.Attributes.Add("onFocus", "javascript:changeSColor(txtQtyPu)");
            txtQtyPu.Attributes.Add("onBlur", "javascript:changeDColor(txtQtyPu)");
now while i am running the application
"  Microsoft JScript runtime error: 'txtQtyPu' is undefined "
what is going wrong ?
Thanks
 

Answers (1)