Welcome Guest, Not a member yet? Register   Sign In
Help escaping at sign (@) from ajax to php
#10

[eluser]digitaleye[/eluser]
[quote author="Chad Fulton" date="1255100339"]

So, you're pointing the URL of the AJAX request to, for example, 'email_callback/[email protected]'. The problem here is that CodeIgniter doesn't allow the @ symbol in URI's, so whenever you get to the @ symbol, CodeIgniter prevents the script from running your email_callback() function.

Fortunately for you, you don't seem to be using that anyway, so you can just remove it, like so:
Code:
$('#email').keyup(function() {
        var email = $("#email").val();
        $.ajax({
            url: 'email_callback/', // I removed the + $(this).val()
            type: 'post',
            data: "email="+escape(email),
            success: function(result) {
                $('#email_check').attr('innerHTML', result);
            }
        });
    });

Good luck![/quote]

This has worked great.

Thanks everyone for your help, very much appreciated.


Messages In This Thread
Help escaping at sign (@) from ajax to php - by El Forum - 10-08-2009, 04:17 PM
Help escaping at sign (@) from ajax to php - by El Forum - 10-08-2009, 07:34 PM
Help escaping at sign (@) from ajax to php - by El Forum - 10-09-2009, 02:25 AM
Help escaping at sign (@) from ajax to php - by El Forum - 10-09-2009, 02:51 AM
Help escaping at sign (@) from ajax to php - by El Forum - 10-09-2009, 02:54 AM
Help escaping at sign (@) from ajax to php - by El Forum - 10-09-2009, 03:05 AM
Help escaping at sign (@) from ajax to php - by El Forum - 10-09-2009, 03:45 AM
Help escaping at sign (@) from ajax to php - by El Forum - 10-09-2009, 03:58 AM
Help escaping at sign (@) from ajax to php - by El Forum - 10-09-2009, 04:00 AM
Help escaping at sign (@) from ajax to php - by El Forum - 10-09-2009, 04:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB