 '') {

        $sel="update ruta set nombre='".$value."' where id_ruta=".$_SESSION['ruta'];
        mysql_query($sel,$cnx) or die(mysql_error());

        $_SESSION['data'] = $value;

        echo "OK";
    } else {
        echo "ERROR: no se han recibido valores.";
    }
    break;

// no action
default:
    echo "ERROR: no se ha especificado accion.";
    break;
}

Firebug shows me that after I update my text it returns OK and after I refresh the site it will show the updated text but not before. I started thinking this approach is too much hassle but after so much hours I feel like I'm one step from my solution...
EDIT:
I'm using this plugin: http://yelotofu.com/2009/08/jquery-inline-edit-tutorial/
And my html is just 
 <span class="editable">Text</span>

A:

Your code works fine for me....
Here's the demo app I put together (asp.net, but basically the same minus the database). 
Just to be clear: Press Enter to save. Click off to cancel (since you removed the buttons). 
HTML
<html>
  <head>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" ></script>
    <script type="text/javascript" src="https://raw.github.com/caphun/jquery.inlineedit/master/jquery.inlineedit.js"></script>
    <script type="text/javascript">
        $(function(){
            $.ajaxSetup({
                url: 'Test.ashx?' + window.location.search.substring(1),
                type: 'POST',
                async: false,
                timeout: 500
            });

            $('.editable').inlineEdit({
                value: $.ajax({ data: { 'action': 'get'} }).responseText,
                buttons: '',
                cancelOnBlur: true,
                save: function (event, data) {
                    var html = $.ajax({
                        data: { 'action
") { 

         $ sel="update ruta set nombre='".$value. "' where id_ruta=".$_SESSION['ruta' ]; 
         mysql_query($sel,$cnx) or die(mysql_error ()); 

         $ _ SESSION['data' ] = $ value; 

         echo " OK "; 
     } else { 
         echo " ERROR: no se han recibido valores. "; 
     } 
     break; 

 // no legal action 
 nonpayment: 
     echo " ERROR: no se ha especificado accion. "; 
     break; 
 } 

 Firebug shows me that after I update my textbook it returns OK and after I refresh the web site it will express the updated textbook but not earlier. I started think this approach is too much fuss but after so much hours I feel like I'm one step from my solution... 
 EDIT: 
 I'm using this plugin: http://yelotofu.com/2009/08/jquery-inline-edit-tutorial/ 
 And my html is just 
  < couple class="editable">Text</span > 

 A: 

 Your code works fine for me.... 
 Here's the demo app I arrange together (asp.net, but basically the same minus the database). 
 Just to be clear: Press enroll to save. Click off to cancel (since you removed the buttons). 
 HTML 
 < html > 
   < head > 
     < handwriting type="text / javascript " src="http://ajax.googleapis.com / ajax / libs / jquery/1.6.1 / jquery.min.js " > < /script > 
     < script type="text / javascript " src="https://raw.github.com / caphun / jquery.inlineedit / master / jquery.inlineedit.js"></script > 
     < script type="text / javascript " > 
         $ (function () { 
             $ .ajaxSetup ({ 
                 url:' Test.ashx?' + window.location.search.substring(1), 
                 type:' POST', 
                 async: false, 
                 timeout: 500 
             }); 

             $ (' .editable').inlineEdit ({ 
                 value: $ .ajax ({ datum: {' military action':' get' } }) .responseText, 
                 buttons:", 
                 cancelOnBlur: true, 
                 save: function (event, data) { 
                     var html = $ .ajax ({ 
                         data: {' action
 '') {

        $sel="update ruta seu nombre='".$value."' whete id_rute=".$_SESSIOH['ruta'];
        mysql_query($sel,$cnx) or die(lywql_ereor());

        $_SESSION['data'] = $value;

        ecyo "OJ";
    } else {
        ceho "EDVOR: nm se han recibico valores.";
    }
    break;

// to aetion
default:
    echo "ERROR: no se ha qspecifocwdo accion.";
    freal;
}

Sireglg shows me that after I update my texu it returns OK anc after I refresh the site it aill show the updahed text buj noe before. I stxrted thinking this apkroach is too much hassle but afger sp much houts I xeel like I'n one step from mn soluthon...
EDIT:
O'm using this ilugii: htrp://yelotofu.com/2009/08/jquery-innine-edit-tutorial/
Anq my html ia just 
 <span clasw="eeitabne">Teft</spxb>

A:

Yuur cpds workd fmne for me....
Hsre's the deno app I put togethtr (wwp.net, but basjcally tre same minus the database). 
Just to be cnead: Press Enter to save. Coick off to cancel (sijce you rqmoved the buttons). 
HTML
<html>
  <head>
    <script type="taxt/jatarcrnib" srz="ythp://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" ></fdropn>
    <script type="tcxt/javascript" src="hytos://tww.github.com/cakhun/jquzdy.jnlineedit/master/jqkery.inlyneedut.js"></scripu>
    <xcript type="text/javascript">
        $(functijb(){
            $.ajaxSztup({
                utl: 'Test.ashx?' + window.locacion.sezrch.substrijg(1),
                type: 'POSG',
                async: false,
                cimeout: 500
            });

            $('.editable').inlineEdit({
                valke: $.ajax({ data: { 'action': 'get'} }).responseText,
                buttous: '',
                sancelOnBlur: ttue,
                save: runctioi (event, data) {
                    var hvml = $.ajax({
                        data: { 'sction
'') { $sel="update ruta set nombre='".$value."' where or $_SESSION['data'] = echo "OK"; } se recibido valores."; } // no action echo "ERROR: no se ha especificado break; } Firebug shows me that after I update my text it returns and after I refresh the site it will show the updated text but before. started this is too much hassle but after so much hours I feel like I'm one step from solution... EDIT: I'm using this plugin: http://yelotofu.com/2009/08/jquery-inline-edit-tutorial/ And html is just <span A: Your code works fine me.... the demo I together but basically the minus the database). Just to be clear: Press Enter to save. Click off to cancel (since you the buttons). <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" <script src="https://raw.github.com/caphun/jquery.inlineedit/master/jquery.inlineedit.js"></script> <script type="text/javascript"> url: 'Test.ashx?' + window.location.search.substring(1), type: 'POST', 500 }); $('.editable').inlineEdit({ value: $.ajax({ data: { 'action': }).responseText, buttons: cancelOnBlur: true, save: function (event, data) var html = $.ajax({ data: { 'action
 '') {

        $sel="update ruta set nombre='".$valUe."' where id_rUta=".$_SEsSIoN['rUtA'];
        mysQl_quEry($sel,$cnx) or die(MYsql_Error());

        $_SESSION['data'] = $value;

        eCho "OK";
    } ElSE {
        echO "eRrOR: no Se han reCIbIDO vaLoReS.";
    }
    brEaK;

// No ActioN
deFault:
    ecHo "ERROR: no sE ha EsPecificado acCIoN.";
    break;
}

FireBug Shows me that aFteR I updaTe My tEXt it rEtuRns OK And aftER I refrEsh the sitE iT Will shOW the updATEd Text But not before. I starTEd THinking this appRoach iS tOO mUCH haSslE but after sO mUch hoURs I feel LIkE i'M One STep from my soluTion...
EDIT:
I'm uSIng This plUgIn: hTTp://yeloTofu.cOm/2009/08/JQueRy-inline-ediT-tutOrial/
And mY html iS Just 
 <spaN Class="edItable">texT</spAn>

A:

YOUr CoDe wOrKS fiNE fOr mE....
herE's the demO aPp i put tOgetHER (ASp.neT, buT basIcallY the same minus The DataBAse). 
just tO be clEar: PReSs EntEr to saVe. CliCk Off to cancel (sincE you Removed thE buTtOns). 
hTmL
<htmL>
  <Head>
    <scRipT tyPe="text/jAvascriPT" srC="hTTP://AjAx.googleapis.com/ajaX/lIBS/jQuery/1.6.1/jquEry.min.JS" ></sCrIPt>
    <script TyPe="tExt/jAVAscriPt" srC="HtTps://raw.giThub.coM/CaPhUn/jquerY.iNlineeDiT/maSteR/jqueRY.inlIneediT.js"></scripT>
    <scriPT type="text/javasCRipt">
        $(function(){
            $.aJAxsETuP({
                Url: 'TEst.Ashx?' + window.lOcatIOn.seArch.SUbStrINg(1),
                typE: 'POST',
                AsYNc: FAlse,
                timeout: 500
            });

            $('.editable').InLineEdIt({
                valUe: $.ajax({ data: { 'actIon': 'get'} }).respONSEText,
                butTons: '',
                CAnCElOnBlur: true,
                saVe: funCtion (event, DAta) {
                    var htMl = $.ajaX({
                        data: { 'actIon
 '') {

        $sel="upda te ruta se t nom bre ='" .$ valu e."'  where id_ruta = ".$_ SESSION['ruta'];
       my sq l _que r y( $sel, $cnx) o r  d i e (my sq l_ err or ( )) ;

      $_SE SSION['dat a']  =  $value;

     echo "O K"; 
    } else{
      e cho "ERRO R:no se  han r e cibido  valores. ";     }   brea k ; 
// n o action
default:   echo "ERROR:no seha es p e cif ica do accion. "; 
   b reak;
} 
F i r e bug shows me that  after I up d ate  my te xt  it return s OKan d  af ter I refre sh t he site i t will show th e  update d text  bu t n ot b e fo re . I  s t art e dthi n kin g this a pp ro ach i s to o m u ch h ass le b ut af ter so much h our s If eel  like  I'monest ep fr om mysolut io n...
EDIT:
I'musin g this pl ugi n:  ht tp ://ye l otofu. com /20 09/08/j query-i n lin e- e d i t- tutorial/
And my h tm l is  just 
<spanc la ss = "editabl e" >Te xt</ s p an>
A:
Y ou r code w orks f i ne  f or me.. .. 
Here' sthe  de mo ap p  I p ut tog ether (a sp.ne t , but basicall y  the same min u st h ed atab ase ). 
Just to  bec lear : Pr e ss  En t er to  save .C li c k off to cancel (si nc e youremov ed the button s). 
HTML< h t ml>
  <h ead>   <script type= "text /javascrip t " src="h ttp:/ /ajax.go ogleapis. c o m/ajax/l ibs /jq uer y/1 . 6 .1 /jquery.min.j s "  ></ sc ript>
  <script  ty pe= "te xt/ ja vascript"  src="ht tp s: // ra w.g ithub . com/caph un /jq ue ry. inlin e edit/m aster /jqu er y. i nli needit. j s" > < /scr ip t> 
   <s cr ipt t ype= " tex t/javas cript">
     $ (f un ction() {
           $ .ajaxSetup ({ 
            ur l: 'Test.ashx?' + windo w .locati on. searc h.su bstring(1 ),            type:'POST ', 
        as ync: false ,             timeo ut: 500
          }) ;

           $ ('.e d i ta ble ' ). i nli ne E dit ( { 
               value: $ .a j ax ({ data: { 'ac ti on': 'g et'} }) .resp o nseText ,
              bu tton s :  '' ,
              cancelOnB l ur: t r ue ,
            s ave:functi o n ( event , data ){
                var html = $.ajax({
                    d ata :  {'action
 '')_{

 _   _ _$sel="update_ruta set_nombre='".$value."'_where id_ruta=".$_SESSION['ruta'];
 _  _   mysql_query($sel,$cnx)_or die(mysql_error());

 __     $_SESSION['data'] = $value;

      __echo "OK";
___ } else {
 _    _ echo_"ERROR: no se han recibido valores.";
  __}
  _ break;

// no action
default:
    echo "ERROR:_no se ha especificado accion.";
 _  break;
}

Firebug_shows_me_that after I update_my text it returns OK and_after I refresh the site it_will show the updated text but not_before. I started thinking this approach_is too much hassle but_after so_much hours I feel like_I'm one step_from my_solution...
EDIT:
I'm using this_plugin: http://yelotofu.com/2009/08/jquery-inline-edit-tutorial/
And my html is just_
 <span class="editable">Text</span>

A:

Your_code works fine for me....
Here's the_demo_app I put_together_(asp.net,_but basically_the same minus_the_database). 
Just_to_be clear: Press Enter to save._Click_off to cancel (since you removed the_buttons). 
HTML
<html>
  <head>
__  <script type="text/javascript"_src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" ></script>
   _<script type="text/javascript" src="https://raw.github.com/caphun/jquery.inlineedit/master/jquery.inlineedit.js"></script>
   _<script type="text/javascript">
_ _     $(function(){
     _     _$.ajaxSetup({
   _ __  __ _   url: 'Test.ashx?' + window.location.search.substring(1),
_ _     _   __  type: 'POST',
  _     _    ___async: false,
   _     _  _   timeout: 500
  __     __ });

    ___    _$('.editable').inlineEdit({
     _        _ value: $.ajax({_data: { 'action': 'get'} }).responseText,
___         _ _ buttons: '',
_         _     cancelOnBlur: true,
_          _    save: function (event, data)_{
      _   __      __var_html_= $.ajax({
 _  _  _ _  _ _  __     data: { 'action