Hi, > Sorry, you're right. the code posted is incorrect. the right one is:
I haven't bothered to try it, but I'm not seeing anything in that code that would pose a problem. Unless you can put together a minimal, self-contained example, I don't think anyone is going to be able to help you. I don't think the fact it's JSP has anything to do with it (unless, of course, the JSP isn't outputting the HTML you expect -- but that's nothing to do with Prototype). > Any other suggestion? Just to create a self-contained example and post it somewhere. Good luck, -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Dec 2, 2:24 pm, "A.B." <[email protected]> wrote: > Sorry, you're right. the code posted is incorrect. the right one is: > > function otherFunc(o){ > [.....] > > }; > > function ajaxCall(url, callbackResponse_1, p) { > try{ > new Ajax.Request(url, { > method: 'get', > asynchronous: true, > onSuccess: function(transport) { > otherFunc(p); > callbackResponse_1(); > } > }); > } catch (exception) { > alert(exception.inspect()); > } > > } > > ..anyway onSucces never got reached because Ajax.request simply die > after onCreate().To be more precise I had a JSP page including three > <script> tag: > <script>prototype.js</script> > <script>ajaxCall.js</script>, which contains the ajaxCall() and the > otherFunc() functions above. > <script>{inline_script}</script>, which contains a function "search()" > that calls ajaxCall(url,callbackResponse_1,p) and, of course, function > callbackResponse_1() itself. > After that there's an anchor in the page's form with > "javascript:search();" in its onClick attribute. > > Please consider that I didn't write this page by myself (..I think, > for other thousands good reasons, that it is really a messy JSP!!!) > I'm just bugfixing it. > > The fact is that the page won't work if simply import prototype.js on > IE7 (7.0.5730.13), but it works on FF (3.6.12) and IE 8. The only ways > that I found out to get it work are: > - moving "function() {return new XMLHttpRequest()" and the end of the > Try.these statement in prototype code (it works in ANY browser i > tried). > - disable "native XMLHttpRequest support" from IE7 advanced options > (but as you easily understand I can't force users to disable a browser > option to use my page.. :-| ). > > Any other suggestion? > > On 2 Dic, 00:05, "T.J. Crowder" <[email protected]> wrote:> Hi, > > > Your code, as quoted, assumes that the symbols `callbackResponse_1` > > and `callbackResponse_2` are defined by a scope enclosing your > > [.....] -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
