The 2nd island of Ajax Islands is released. Using this class you can add Ajax links to your HTML pages without getting involved with JavaScript and XMLHttpRequest. You can associate a link (An A tag or any kind of HTML element as a link), a container (A DIV tag or any other container element) and URL(In fact, from the same server). So when the user clicks the link, the content of the URL will appear in the container. You can also introduce an image as a loading indicator to be displayed at the center (horizontally and vertically) of the container, so the user can wait for the new content to be fetched.
Download AjaxContent and take a look at live examples
The class has a very nice and powerful feature:
The last argument of the constructor, which is supposed to be a Boolean value, determines that if the script tags in the content should be added to the document scripts or not!!! (Not using a simple eval). So if you pass a true value to this argument, all script tag from the content will load and can be accessed from the current scripts of the page.
No comments:
Post a Comment