Click here to Skip to main content
15,905,971 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i wrote one java script in html page . now i want to call that function when keyup event for a textbox in windows form. is it possible?

this is the my javascript

JavaScript
function TextLanguageAr(e, input) 
{
   var unicode = e.which;  
   switch (unicode) 
   {
      case 192: input.value += 'ذ';   return false; break;      
      case 81: input.value += 'ض';   return false; break;      
      case 87: input.value += 'ص';   return false; break;      
   }
}

function Shift_Key_pressed(e)
{
   kc = e.which;
   sk = e.shiftKey ? e.shiftKey : ((kc == 16) ? true : false);  
   if (((kc >= 65 && kc <= 90) && !sk) || ((kc >= 97 && kc <= 122) && sk))  
      return false;  
   else
      return true;  
}
Posted
Updated 24-Aug-12 5:33am
v3
Comments
[no name] 24-Aug-12 12:37pm    
http://social.msdn.microsoft.com/forums/en-us/winforms/thread/0A3B90B1-E834-41C3-834D-B45815E32C7C

 
Share this answer
 
Comments
sai sagar 24-Aug-12 5:24am    
Could not load file or assembly 'Microsoft.JScript' or one of its dependencies.

i got this error in page load
ridoy 24-Aug-12 7:50am    
Check and make sure the "Microsoft.JScript.dll" file exists in the .NET Framework runtime directory. Typically that directory is "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" for 32-bit machines and C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727 for 64-bit machines.
sai sagar 27-Aug-12 5:11am    
ya i added that dll to my application and but still i am getting same error
Could not load file or assembly 'Microsoft.JScript' or one of its dependencies. ‏‏
you can use WebBrowser Control.
string s = File.ReadAllText(@"F:\Temp\MyWebPage.html");
           myWebBrowser.DocumentText = s;
 
Share this answer
 
v2
Comments
sai sagar 24-Aug-12 5:10am    
please could you read my post clearly. i want call that function when keyup event for a text box

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900