Me again, I check my code again and made some changes to it:
<div id="fNombre">Some Text</div>
<script type="text/javascript">
 new Ajax.InPlaceEditor('fNombre', 'test.php?a=actualizar&f=aDescripcion', 
{okText:'Save', cancelText:'Discard', size:25});
</script>
<div id="fDescripcion">some text</div>
<script type="text/javascript">
 new Ajax.InPlaceEditor('fDescripcion', 'test.php?a=actualizar&f=aNombre', 
{okText:'Save', cancelText:'Discard', size:25, cols:50, rows: 10});
</script>

And in file test.php I have this:
<?
 $field = isset($_REQUEST['f'])?$_REQUEST['f']:null;
 die ( $field );
?>

So is supposed when I die ($field) this must take two options: 
1) If I play with first inPlaceEditor called 'fNombre' then the value for 
$field was the text typed in fNombre field.
2) If I play with second inPlaceEditor called 'fDescripcion' then the value for 
$field was the text typed in fDescripcion field.

But this not happen. When I do this:
1) Play with first "inPlaceEditor" called 'fNombre' and clic in Save button 
then the value take is fDescripcion
2) Play with second "inPlaceEditor" called 'fDescripcion' and clic in Save 
button then the value take is fNombre
What's wrong at this point ?
Regards, 
-- 
ReynierPM 
4to. Ing. Informática 
Linux User: #310201
El programador superhéroe aprende de compartir sus conocimientos. Es el 
referente de sus compañeros. Todo el mundo va a preguntarle y él, secretamente, 
lo fomenta porque es así como adquiere su legendaria sabiduría: escuchando 
ayudando a los demás...  
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to