Hi,
I'm trying to update a select element with remote_function.
My problem is with quotation marks:
With ajax I return a select element that is similar to this:
<select name="catid" id="catid" onchange="new Ajax.Request('/
backend_dev.php/page/load', {asynchronous:true, evalScripts:false,
onComplete:function(request, json){updateJSON(request,json);
Element.hide('ajax-loader')}, onLoading:function(request, json)
{Element.show('ajax-loader')},
parameters:Form.serialize(this.form)})">
<option value="-0">Select a Category</option> <option
value="-1">--------------------------</option> <optgroup label="Main
Section"><option value="1">Main Category</option> </optgroup> </
select>
Since JSON syntax is like this:
'[["element", "text"]]'
I cannot have three different quotes in a string.
Event tried to add slashes to them and in updateJSON to replace them
back, but keeps giving me syntax error.
Any ideas how to do this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---