Hey,
I was just thinking about 1) - maybe (I did not check yet) is using the
$_POST variable, since this is default I think. I usually use the
$_REQUEST in PHP which takes _GET and / or _POST. See the PHP manual for
more questions.
2) Your syntax is probably not correct (maybe this is the solution for
1) too).
new Ajax.InPlaceEditor('aNombre',
'productos.php?a=actualizar&f=aNombre', {okText:'Update',
cancelText:'Leave changes'} );
so, the third parameter is surrounded with the { brackets, the options
are seperated with commas, the values have a colon, no equal.
see the extended demos for more information
http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor
hope this helps. GNight.
greetings,
benni.
-SDG-
Reynier Perez Mira wrote:
Well, I start recently with Scriptacolus and inPlaceEditor. I have two doubts
about use it.
1) When I specify URL for save changes or not it doesn't work. See example
below:
<script type="text/javascript">
new Ajax.InPlaceEditor('aNombre', 'productos.php?a=actualizar&f=aNombre');
</script>
In productos.php file I have this:
$field = isset($_GET['f'])?$_GET['f']:null; // wich means the field for update
or not
if ($_GET['a'] == "actualizar") {
switch ($field){
case "aNombre":
die (' You try to edit aNombre field ');
break;
}
}
But it not works, nothing is returned for me.
2) How I can customize elements? I see in inPlaceEditor doc the sintax for this one:
new Ajax.InPlaceEditor( element, url, [options]);
It's simply. My doubt is for example how to change the value for "Ok" and
"Cancel" button . I try with this:
new Ajax.InPlaceEditor('aNombre',
'productos.php?a=actualizar&f=aNombre','okText=Update cancelText='Leave
changes'');
But not works
Best,
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs