brianlange Posted January 31, 2011 Share Posted January 31, 2011 I have a html form that submits to another website. Everything works fine in firefox and chrome however the data is duplicated in IE. Is there some quirk in IE when submitting a form to a different website? Quote Link to comment https://forums.phpfreaks.com/topic/226269-form-action-attribute-submits-to-remote-website/ Share on other sites More sharing options...
brianlange Posted January 31, 2011 Author Share Posted January 31, 2011 Should I try using curl? I was hoping this wasn't necessary. Quote Link to comment https://forums.phpfreaks.com/topic/226269-form-action-attribute-submits-to-remote-website/#findComment-1167998 Share on other sites More sharing options...
ManiacDan Posted January 31, 2011 Share Posted January 31, 2011 Are you double-clicking the button? Quote Link to comment https://forums.phpfreaks.com/topic/226269-form-action-attribute-submits-to-remote-website/#findComment-1168013 Share on other sites More sharing options...
The Letter E Posted January 31, 2011 Share Posted January 31, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/226269-form-action-attribute-submits-to-remote-website/#findComment-1168016 Share on other sites More sharing options...
brianlange Posted January 31, 2011 Author Share Posted January 31, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/226269-form-action-attribute-submits-to-remote-website/#findComment-1168041 Share on other sites More sharing options...
brianlange Posted January 31, 2011 Author Share Posted January 31, 2011 ie doesn't like my ajax call. Why wouldn't it? Quote Link to comment https://forums.phpfreaks.com/topic/226269-form-action-attribute-submits-to-remote-website/#findComment-1168044 Share on other sites More sharing options...
The Letter E Posted January 31, 2011 Share Posted January 31, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/226269-form-action-attribute-submits-to-remote-website/#findComment-1168051 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.