Reputation: 195
i am wondering i am trying to create a function which will create a set of drop down menus once the dialog box has been opened and not before... i have made the php function and called it test i am wondering if there is a way to use javascript or maybe ajax(which seems like the most logical way) to get this function to run once the dialog box appears.. its only a very small function which wouldn't take longer the a second to run. so really i am just looking for some advice on how i could get this to work.. in case i was confusing i am wanting to run a php function only once the dialog box has been opened and then when the dialog box is closed to remove whatever the function created.
but with my very limited knowledge in ajax,javascript or jquery i cant really think of how to begin any help would be greatly appreciated
Upvotes: 0
Views: 223
Reputation: 4294
Look here for the dialog open callback (using JQuery UI) http://jqueryui.com/demos/dialog/#event-open
Look here for the AJAX call you can use to get the data from your PHP script: http://api.jquery.com/category/ajax/
That should get you going.
Upvotes: 1