Skip to main content

Posts

Showing posts with the label parameters

PHP pass function as param then call the function?

I need to pass a function as a parameter to another function and then call the passed function from withing the function...This is probably easier for me to explain in code..I basically want to do something like this: function ($functionToBeCalled) { call($functionToBeCalled,additional_params); } Is there a way to do that.. I am using PHP 4.3.9 Thanks! Source: Tips4all

Passing parameters to a JQuery function

I'm creating HTML with a loop that has a column for Action. That column is a Hyperlink that when the user clicks calls a JavaScript function and passes the parameters... example: <a href="#" OnClick="DoAction(1,'Jose');" > Click </a> <a href="#" OnClick="DoAction(2,'Juan');" > Click </a> <a href="#" OnClick="DoAction(3,'Pedro');" > Click </a> ... <a href="#" OnClick="DoAction(n,'xxx');" > Click </a> I want that function to call an Ajax jQuery function with the correct parameters. Any help? Source: Tips4all