You have a syntax error

Internet explorer chokes on commas in JSON notation (i learnt the hard way 
on this)....

For example

var foo= {

    method_1: funciton() {
    alert('Method 1 Baa');
}, // this is wrong as it needs no trailing comma

}
var foo= {

    method_1: funciton() {
    alert('Method 1 Baa');
}// this is right as there is no comma

}
........................

In your example you have a trailing comma
var myAjax = new Ajax.Updater(target, url,
{
method: 'post',
parameters:
{
params:pars
}, // end parameters ... you had a comma here but no curly braces enclosing 
the parameters (possibly anlther synatical mistake as it may expect a Json 
array/object rather than one variable
onComplete : function(){
alert ('ajax completed!');
} // end onComplete
}// end options
);// end ajax initialisation



HTH

Alex
----- Original Message ----- 
From: <partypeopl...@gmail.com>
To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com>
Sent: Tuesday, June 02, 2009 3:13 PM
Subject: [Proto-Scripty] Re: Problem with Ajax.Updater...


>
> @Alex
> I encodeURIComponent them now, thanks for suggestion
>
> notice that when you are sending the key values with the url, they get
> caught as $_GET, no matter if you use {method: 'post'} (!)
>
> @T.J.
> all your assumptions are right ;)
>
> anyway, if you add some alerts to see what's going on like this:
> ...
>     alert ('initiating...');
>     var myAjax = new Ajax.Updater(target, url, {method: 'post',
> parameters: pars, onComplete:function(){alert ('ajax completed!');}});
>
> IE will show the first alert, but not the second, which means that for
> some unknown reason, ajax doesn't complete.
> maybe IE doesn't like my parameters???
>
> here they are:
> [updatedata] => &Itemid=96-epomeno-, c.cb_gender AS cb_gender-epomeno--
> epomeno--epomeno-GUESTS ALLOWED-epomeno-0-epomeno-1-epomeno-1-
> epomeno-1-epomeno-1-epomeno-1-epomeno-1-epomeno-62
>
> (-epomeno- is string used to explode updatedata to an array, means -
> next- in greek)
>
> [appendarray] => 2195,2194,2191,2188,2159,2158,2148,2138,2134,2130
>
> [pageopened] => 1243949520
>
> what could it be that can prevent execution in IE, while works fine on
> other browsers?
> any thoughts?
> >
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to