Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i make a abc() function that return hello, how i call it on javascript page.
Posted

Are we really to believe that two users asked the exact same question within seconds of each other ?
 
Share this answer
 
You must do a postback and in the delegate call you method abc().
For make a postback in javascript you can use GetPostBackEventReference.

Or use Ajax callbacks to Web Methods
 
Share this answer
 
v2
Hi,

try this

C#
function doClick(e){
               //the purpose of this function is to allow the enter key to
               //point to the correct button to click.
       var key;
        if(window.event)
             key = window.event.keyCode;     //IE
        else
             key = e.which;     //firefox

           if (key == 13)
           {
               //Get the button the user wants to have clicked
               var btn = document.getElementById("ctl00_ContentPlaceHolder1_btnSearch");
               if (btn != null)
               { //If we find the button click it
                   btn.click();
                   event.keyCode = 0
               }
           }
       }
 
Share this answer
 

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