i m make a component for joomla 1.5.... com_test.xml <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE install SYSTEM "http://dev.joomla.org/xml/1.5/component-install.dtd"> <install type="component" version="1.5.0"> <name>Test</name> <creationDate>Dec 2008</creationDate> <author>----------</author> <authorEmail>------------</authorEmail> <authorUrl>----------------</authorUrl> <copyright>(C) 2008 All rights reserved.</copyright> <license>GNU/GPL</license> <version>1.5.0</version> <description> test </description> <files> <filename>index.html</filename> <filename>test.php</filename> <filename>ck.php</filename> <filename>prototype.js</filename> </files> <administration> <menu>Test</menu> <submenu> <menu link="option=com_test&task=test">Test Management</menu> </submenu> <files folder="admin"> <filename>index.html</filename> </files> </administration> </install> ck.php <?php if($_POST["name"] == "") echo "name is empty"; else echo "you typed ".$_POST["name"]; ?> test.php <html> <head> <script type="text/javascript" src="prototype.js"></script> <script> function sendRequest() { new Ajax.Request("ck.php", { method: 'post', postBody: 'name='+ $F('name'), onComplete: showResponse }); } function showResponse(req){ $('show').innerHTML= req.responseText; } </script> </head> <body> <form id="test" onSubmit="return false;"> <input type="text" name="name" id="name" > <input type="submit" value="submit" onClick="sendRequest()"> </form> <div id="show"></div> </body> </html> component install successfully but it's not work. when click submit button its not work. whats the prob?how can i solve it?can anyone tell me details about this. Thank u
Have you checked if Prototype works with Mootools? I believe there is a clash with the two which will cause problems. Joomla comes pre-loaded with mootools and loads it automatically in the front end for all pages, its a pain and unnecessary and will be fixed in the next version. However if your calling in another JS library you need to make sure they are compatible.
go with firebug and check if your js is found could be that the path is not good, you might want to look at how mootools js is called. I would advise you to use mootools as it s already included in j 1.5. If you add jquery or prototype, your site will be slow loading, you can test the impact with yslow, a plugin that integrate with firebug have fun