Jquery Validation URL Problem |
[eluser]hykoh[/eluser]
Hello, i got a problem with my jQuery Validation URL ... it always try to send: Code: GET http://www.example.com/registration/ajaxControl/?username=test 190ms It responds (cauz the GET Query Request): Code: The URI you submitted has disallowed characters. I've looked in the jquery.validate.js to locate the URL building function, but without results. Is there any way for CI to rewrite the URLs to segments like Code: registration/ajaxControl/username/test Thanks for your help
[eluser]Nick Husher[/eluser]
Not knowing that much about jQuery, would it be possible to pass it by POST instead of GET?
[eluser]Pascal Kriete[/eluser]
Nick is on the ball, as usual. In the 'remote' function there is a call to $.ajax . I don't have the source in front of me, but what you need to do is add the type parameter: Code: $.ajax({
[eluser]Nick Husher[/eluser]
Just to be really clear, GET query strings in CodeIgniter are disallowed by default. Characters in your disallowed url characters list (in config or routes.php, IIRC) will trigger the error message you're getting. As an alternative to using POST, you can take a look at enabling query strings and enabling some creative routing: http://ellislab.com/codeigniter/user-gui.../urls.html |
Welcome Guest, Not a member yet? Register Sign In |