Click here to Skip to main content
14,696,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a function in 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?

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

1 solution

Something like this:

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


Cheers,
Edo
   
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