Basic AJAX Question:
Download Job Interview Questions and Answers PDF
Will HTML_AJAX integrate with other Javascript AJAX libraries such as scriptaculous? How would this integration look like?
Answers:
Answer #1HTML_AJAX doesn't have specific plans to integrate with other JavaScript libraries. Part of this is because external dependencies make for a more complicated installation process. It might make sense to offer some optional dependencies on a library like scriptaculous automatically using its visual effects for the loading box or something, but there isn't a lot to gain from making default visuals like that flashier since they are designed to be easily replaceable.
Most integration would take place in higher level components. Its unclear whether higher level components like that should be part of HTML_AJAX delivered through PEAR or if they should just be supported by HTML_AJAX and made available from http://www.globalguideline.com or some other site. If your interested in building widgets or components based on HTML_AJAX please let me know.
HTML_AJAX does however offer the ability to use its library loading mechanism with any JavaScript library. I use scriptaculous in conjunction with HTML_AJAX and I load both libraries through the server.
Most integration would take place in higher level components. Its unclear whether higher level components like that should be part of HTML_AJAX delivered through PEAR or if they should just be supported by HTML_AJAX and made available from http://www.globalguideline.com or some other site. If your interested in building widgets or components based on HTML_AJAX please let me know.
HTML_AJAX does however offer the ability to use its library loading mechanism with any JavaScript library. I use scriptaculous in conjunction with HTML_AJAX and I load both libraries through the server.
Answer #2To do this you just need to register the library with your server and load add its flag to your include line.
<?php
$this->server->registerJSLibrary('scriptaculous',
array('prototype.js','scriptaculous.js','builder.js','
effects.js','dragdrop.js','controls.js','slider.js'),'/pathto/scriptaculous/');
?>
<script type="text/javascrpt" src="server.php?client=scriptaculous">
</script>
<?php
$this->server->registerJSLibrary('scriptaculous',
array('prototype.js','scriptaculous.js','builder.js','
effects.js','dragdrop.js','controls.js','slider.js'),'/pathto/scriptaculous/');
?>
<script type="text/javascrpt" src="server.php?client=scriptaculous">
</script>
Download AJAX Interview Questions And Answers
PDF
Previous Question | Next Question |
Why does HTML_AJAX hang on some server installs? | Won't my server-side framework provide me with AJAX? |