Thanks Mike, These inline script always come with
<script type="text/javascript"><!-- // code here //--></script> When I use firebug to check the json data returned, it looks like this: (I just post part of the code here) -------------------------------- "jscript_inline":"<script language=\"javascript\" type=\"text\/ javascript \"><!--\r\nalert('balh');\r\nvar selected;\r\nvar submitter = null;\r \nfunction popupWindow(url) {\r \n window.open (url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars =yes,resizable=yes,copyhistory=no,width=450,height=320,screenX=150,screenY=150,top=150,left=150') \r\n }\r\nfunction couponpopupWindow(url) {\r\n window.open (url,'couponpopupWindow','toolbar=no,location -------------------------------- I wonder if eval will work correctly in this case? Regards Raine On Jan 9, 2:50 pm, "Michael Geary" <m...@mg.to> wrote: > You can execute JavaScript code with the eval function, e.g. > > eval( result.jscript ); > > -Mike > > > From: yellow1912 > > > After I submit my form via ajax, I sometimes get back content (json > > format) with some inline jscript in one of the fields (i.e: > > result.jscript) > > > I've been trying to do something like this: > > $('#output').append(result.jscript); > > > It doesn't seem to work, however. > > > (In my case, I can't avoid these inline jscript, so I can't > > really put them in external js files to load) > > > I really hope someone can shed some light here > > > Regards > > > Raine