Click here to Skip to main content
15,885,658 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a function in javascript

JavaScript
function onGet(buttonid) {
//             debugger;
             var bt = document.getElementById(buttonid);
             to = setTimeout('performSearch();', 300);
         }




and another function with in the script is performSearch() and i want to pass "bt" in to performSearch(). How can i do this?

JavaScript
function performSearch(bt) {
             debugger;
             if (prm.get_isInAsyncPostBack) {
                 prm.abortPostBack();
             }
             $get("<%=lblStatus.ClientID %>").innerHTML = "Loading...";
Posted
Updated 8-Aug-13 1:20am
v3

1 solution

Something like this:

to = setTimeout('performSearch();', 300);
JavaScript
to = setTimeout(function() {
    performSearch(bt);
}, 300)


Cheers,
Edo
 
Share this answer
 
Comments
Member 8390746 8-Aug-13 7:25am    
Thanks Its working..
Joezer BH 8-Aug-13 7:28am    
You are welcome.

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