I would like to get the content of a php file on the click event of an element while blocking the ui by using this plugin. My code is this:
<li onclick="$.blockUI({ message: $.get('page.php') });" />
this does block the UI, but nothing else happens. Does the jQuery get function return the contents of that file? Should I use another function for this purpose?
What you might be looking to do would be the following:
Though if your
page.phptakes a moment or two to build,blockUIwon't fire until it does.Also, I've had mixed results with putting complex commands in an
onclickorhref, so I've found it more reliable to call a function.