Hi there, I''m using the prototype 1.5 in a J2EE project with MVC Pattern. All thinks are working very well in Firefox and Iceweasel, but when I tried test it on IE browser, it doesn''t work. I got anything as a response. When the application do the "AJAX query", it put in a DIV this text "Loading ..." and after that update the DIV with the content, but in IE, the DIV is not updated! =( How can I sort out it? Are there someone who can help me? Thanks. Regards. Rogério. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Posting the code makes debugging easier. A common problem in IE is that unlike other browsers, it doesn''t extend Elements with the Prototype functions once at page load (as Firefox does, for example). Instead, each element has to be extended before you use Prototype''s mixins. This is handled transparently by the $() function. TAG On Aug 31, 2007, at 1:37 PM, T4K3S wrote:> > Hi there, > > I''m using the prototype 1.5 in a J2EE project with MVC Pattern. All > thinks are working very well in Firefox and Iceweasel, but when I > tried test it on IE browser, it doesn''t work. I got anything as a > response. > > When the application do the "AJAX query", it put in a DIV this text > "Loading ..." and after that update the DIV with the content, but in > IE, the DIV is not updated! =( > > How can I sort out it? Are there someone who can help me? > Thanks. Regards. Rogério. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Tom, thanks for answer. So, the code I''m using in that project is the following: // customized prototype.js file ---------------------------------------------------- var tagGeneral; function submitAjax(url, formName, tagUrl, showLoading, cleanMsg) { window.document.body.style.cursor = ''wait''; if(showLoading == null){ showLoading = true; } if(url.indexOf(''?'') >= 0) { url += ''&dummy='' + getRandom() + ''_'' + getCurrentTime(); } if(showLoading){ $(tagUrl).innerHTML=''<h1>Loading ...</h1>'' + $(tagUrl).innerHTML; } tagGeneral = tagUrl; var params = Form.serialize(formName); new Ajax.Updater({success: tagUrl}, url, {method: ''post'', parameters: params, onComplete:processError, evalScripts: true}); } function processError(request) { var aux = $(tagGeneral); window.document.body.style.cursor = ''default''; // Do a test to know if the session has been expired // If it''s expired, redirect to a 1st page if( aux != null && aux.innerHTML.indexOf(''<div id="login">'') != -1 ) { aux.innerHTML = ''''; form.submit(); return true; } } ... // end of customized prototype.js file ------------------------------------------- // my .jsp file ------------------------------------------------------------------------ var globalAjaxDivName = ''''; ... function exibirBemPublico( link ) { globalAjaxDivName = ''divBemPublicoPesquisa''; submitAjax(link , document.manterEmpreendimentoForm, globalAjaxDivName, true); } ... <div id="divBemPublicoPesquisa" class="janela_ajax"> </div> // end of my .jsp file --------------------------------------------------------------- In some tests I did, I saw when I call a page that has just a simple text, without javascripts tags, it works fine! But when there are javascript tags, it just doesn''t show the results in a target div, even taking the response in a variable! :-/ I hope you are able to help me! =) Regards. Rogério. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Pleeeeeease! =) Could someone help me with that?? I already did debug with "Firebug", but I wont was able to catch the problem! :-/ Regards, Rogério. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Oops ... I found my implementation problem! In fact it''s so simple. The problem was the way IE works with two form tag, one inside other. I have a page that contains a main FORM tag (form1) and a DIV where the AJAX response is inserted. The other page, which I call by AJAX, have another FORM tag (form2). So, this way, when start the process, in FF it works fine, but in IE it doesn''t work! So the solution was take of the FORM tags of that pages are called by AJAX process to update the main page. I hope it helps someone! Rogério. --- EXEMPLE --- ... <form name="form1"> ... <div id="ajaxbody"> <form name="form2"> ... </form> </div> ... </form> ... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---