Jump to content

Recommended Posts

What do you mean it's duplicated?

 

Do you mean in your $_REQUEST[] array there is two values for each parameter??

 

That shouldn't matter assuming the page you are posting to has there data being organized after post and not looped through. Maybe a little more detail would help the community understand what's going on.

 

One thing that I know commonly happens with arrays is this:

 

array(

    ["MY_FIELD"] => VALUE

    [0]                => VALUE

    ["MY_FIELD2"] => VALUE2

    [1]                  => VALUE2

)

 

That way you have the option to access the key as a numbered value or as your chosen field name.

 

More details please :)

 

E

Thanks for the response. ie didn't seem to like that I was submitting the form with jquery.  Here's my jquery code

 $.ajax({type: 'POST', 
                url: '/index/check-email', 
                async: 'false', 
                data: {email: $('#email').val()}, 
                complete: function(XMLHttpRequest, textStatus) {
            
                if (XMLHttpRequest.responseText == 'fail') {
                    
                    $('#norisk').css("display", "none");
                    $('p.error').css("display", "block");
                    return false;
                       
                } else {
                    return true;
                    //$('#form').submit();
                   
                } 
    }});

 

So I removed the submit code and added onsubmit="return checkForm();"

This code also has issues with IE.  I tried adding an onclick event to the submit button but the problem persists.

ie doesn't like my ajax call. Why wouldn't it?

 

I don't work with jQuery, much. I would say try creating a standard AJAX call using the XMLHttpRequest object. Google it if your not sure what it is.

 

If that works, you can guarantee it's a jQuery compatibility issue.

 

Assuming it is jQuery:

 

1. check for known bugs, by jQuery

2. check for a new jQuery update

3. consider not using jQuery at all

 

JS Debugging:

 

Place alerts in different areas of your js that will show you:

 

1. once your function has been fired

2. once your data/post variables have been set

3. request status

4. request result

 

These things may give you a better idea of "what" is happening in more detail.

 

I wish I could be more helpful with jQuery specifically. Maybe post this up on the AJAX Help forum; http://www.phpfreaks.com/forums/ajax-help/

 

Good luck,

 

E

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.