php - localhost != remote server -


I am developing / testing a site locally on the MMP (example LMP) environment I have a form That has been processed by jQuery which works locally well; I do not want to submit it, but to send values ​​for an AJAX function.

The problem is that when it runs on a remote server, the 'action' destination of the form parameter presents a lot with the same set up, eg Apache, PHP, etc. no code is different . So when I submit the form, the jQuery form does not catch it, it just goes ahead and submits.

Any thoughts? Thanks in advance.

jQuery:

  function save_words_ajax (username, save_wORD, savings_USA) {$. Ajax ({type: "GET", url: "ajax / save_word .jax.php", data: "user name =" + username "& amp; save_word =" + save_word + "& save_meaning =" + Save_meaning, data type: "html", success: function (html) {$ ("# show (" sharp ");} complete: function () {setTimeout ('$ (" # complete "). ") ', 1500);}};}  

html:

  form id =" new_word_form "action =" ajax / save_word .ajax.php "method =" get "charset =" utf-8 "> << 

<> input Type = "text" name = "save_word" value = "word" class = "cleanup" /> input type = "hidden" name = "semantic_set" value = "semantic" /> Type = "text" name = "save_meaning" value = "semantic" class = "cleanup" /> input type = "submit" name = "some_name" value = "+" id = "some_name" /> ;

Make sure jQuery and your capturing code are available on the site, e.g. Make sure that it is full of inspection with the source

Also make sure the event listener is correctly registered to capture the presentation and the event has ended. The code you posted does not show when and how the onsite event is handled.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -