Everyone seems to have missed a solid point on this ...
The scripts are loded localhost:4402 and the server= localhost:8080 Thats an XDR as the ports differ ... Perhaps 3.5.5 has some different security protocol in place that wont allow it but earlier did Alex Mcauley http://www.thevacancymarket.com ----- Original Message ----- From: "joe t." <thooke...@gmail.com> To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com> Sent: Sunday, December 13, 2009 1:49 AM Subject: [Proto-Scripty] Re: Autocompleter does not work in FireFox 3.5.5 Uhhhh, right, sure, yeah, of COURSE i saw that... (didn't). i tend to agree with you on [not] placing the active script block at the end of the document and trusting it to work 100% of the time. Like you, i haven't seen any hard data on why NOT to, but just don't fully trust it. i don't see any obvious reason the script would be failing. Tracing back #clearWhitespace from Prototype, it only occurs in Autocompleter in the #onComplete callback. i don't use the class that much, so i'm not the best one to ask. i just happened across your initial response in my digest email. :O Sorry i couldn't be more help on this one. -joe t. On Dec 12, 6:05 am, "T.J. Crowder" <t...@crowdersoftware.com> wrote: > > Just tossing in: Alternately, the <script> block that has the "active" > > part can be placed at the end of the document, so the DOM elements are > > loaded by the time the browser reaches that <script> tag. > > I've never been comfortable relying on that. I've heard people say it, > some of them even people who seem like they know what they're doing, > but I've never been comfortable *relying* on it. I really should find > (or do) some really robust tests, probably a point of ignorance for > me. > > Good catch that his script block *is* at the end. If you can count on > elements being in place at that point, any idea why it's failing? > > -- T.J. > > On Dec 12, 2:00 am, "joe t." <thooke...@gmail.com> wrote: > > > > Always makes me eager to jump in and spend my time helping. ;-) > > > Nice. > > > Just tossing in: Alternately, the <script> block that has the "active" > > part can be placed at the end of the document, so the DOM elements are > > loaded by the time the browser reaches that <script> tag. You knew > > that, but OP maybe didn't. > > -joe t. > > > On Dec 11, 11:02 am, "T.J. Crowder" <t...@crowdersoftware.com> wrote: > > > > Hi, > > > > > I have not really tried to debug this. > > > > Always makes me eager to jump in and spend my time helping. ;-) > > > > But the error is obvious enough in this case: You're trying to access > > > the DOM from inline script, which won't work; the DOM doesn't exist > > > when that script is executed. You need to use the window.load or > > > dom:loaded event. > > > > document.observe('dom:loaded', function() { > > > // Create the autocompleter > > > > }); > > > > HTH, > > > -- > > > T.J. Crowder > > > Independent Software Consultant > > > tj / crowder software / comwww.crowdersoftware.com > > > > On Dec 11, 3:10 pm, mjk <mj.kelle...@gmail.com> wrote: > > > > > The error must be coming from another method that retrieves > > > > 'element'. I have not really tried to debug this. Wondering if > > > > anyone else has had this problem, and how they remedied it. > > > > > The HTML > > > > > <html> > > > > <head> > > > > <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> > > > > <script type="text/javascript" src="http://localhost:4402/author/js/ > > > > prototype.js"></script> > > > > <script type="text/javascript" src="http://localhost:4402/author/js/ > > > > effects.js"></script> > > > > <script type="text/javascript" src="http://localhost:4402/author/js/ > > > > controls.js"></script> > > > > <style type="text/css"> > > > > div.autocomplete { > > > > position:absolute; > > > > width:250px; > > > > background-color:white; > > > > border:1px solid #888; > > > > margin:0; > > > > padding:0;} > > > > > div.autocomplete ul { > > > > list-style-type:none; > > > > margin:0; > > > > padding:0;} > > > > > div.autocomplete ul li.selected { background-color: #ffb;} > > > > div.autocomplete ul li { > > > > list-style-type:none; > > > > display:block; > > > > margin:0; > > > > padding:2px; > > > > height:32px; > > > > cursor:pointer;} > > > > > </style> > > > > </head> > > > > <body> > > > > <label for="input">Autotext:</label> > > > > <input type="text" id="input" name="input" size="15" /> > > > > <div id="results" class="autocomplete" style="display: none; > > > > position:relative;"></div> > > > > <script type="text/javascript"> > > > > var txtid = 'input'; > > > > var divid = 'results'; > > > > var server = 'http://localhost:8080/ewcmtestbed/autocomplete'; > > > > new Ajax.Autocompleter(txtid, divid, server, { tokens: ','}); > > > > </script> > > > > </body> > > > > </html> > > > > > The error: > > > > In prototype.js > > > > element is null > > > > > The method: > > > > cleanWhitespace: function(element) { > > > > element = $(element); > > > > var node = element.firstChild; > > > > while (node) { > > > > var nextNode = node.nextSibling; > > > > if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) > > > > element.removeChild(node); > > > > node = nextNode; > > > > } > > > > return element; > > > > }, > > -- 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-scriptacul...@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. -- 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-scriptacul...@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.