Problem with jquery when i'm trying to remote |
[eluser]Ricola[/eluser]
hi there, i'm trying to remote to controller with jquery but nothing respond back this is my code (views) Code: $(function(){ and this controller Code: public function check() that's all i did but , actually this code work in the demo but i dont understand why it doesn't work with CI i'm trying to search and answer in CI forums but it seems nothing work for me this is a jquery validate that i'm using http://bassistance.de/jquery-plugins/jqu...alidation/ Thank you
[eluser]Gerep[/eluser]
Are you using .htacces to take index.php? Is no, you have to add index.php on your url.
[eluser]Ricola[/eluser]
hi greep, i actually used .htaccess and i can access to controller by using url like this "http://www.codeigniter.com/login/check" thanks Ricola
[eluser]Gerep[/eluser]
Take a look at your code on the browser and check if the javascript link is correct
[eluser]Ricola[/eluser]
i checked at my code link and everything is ok( i think so) Would u mind giving me a working code of your codeigniter by using jquery?
[eluser]Gerep[/eluser]
This is a piece of code: Code: $.ajax({ The data Code: data: 'email='+$('#email').val(), I what I receive on my newsletter method like: Code: $this->input->post('email');
[eluser]Cristian Gilè[/eluser]
Quote:remote: "http://www.telltab.com/login/check" index.php is missing. Are you using url rewrite to remove index.php from the URLs? Otherwise the url should be: Code: remote: "http://www.telltab.com/index.php/login/check" EDIT: sorry, I posted my answer too late Cristian Gilè
[eluser]Cristian Gilè[/eluser]
Quote: In the posted code a closing bracket is missing. It should be: Code: $(function(){ Cristian Gilè
[eluser]Ricola[/eluser]
thanks you for all suggestion but i'm done with this jquery plugin actually i tried out by execute without codeigniter , everything work fine but i don't know what exactly problem is , i use my posted code with codeigniter 2.0 everything respond except remote method. required , email works fine but remote still not giving me a respond thank you for ur fast reply
[eluser]Unknown[/eluser]
The quick solution is that if you are using JQuery 1.5.x, downgrade it to JQuery 1.4.x. The reason is because JQuery 1.5.x has changed the way it uses ajax. In the validation plugin, the remote uses the ajax of JQuery (as long as I understand). A difference I have found is that in the URL is append a callback id. The problem is that it is passed through GET and you have to use it, but I don't know exactly why and how. So, if any have a better idea or reason please post it. I think this is a regular problem and there's not yet a clear solution. |
Welcome Guest, Not a member yet? Register Sign In |