search for: cleanwhitespace

Displaying 16 results from an estimated 16 matches for "cleanwhitespace".

2006 Apr 27
14
cleanWhitespace and parentNode
Hey cats, I seem to have ran into a problem in IE trying to use parentNode with the cleanWhitespace method. doing something like: var div = $(''mydiv''); Element.cleanWhitespace(div); works really great, but try doing: var div = $(''mydiv''); Element.cleanWhitespace(div.parentNode); or var div = $(''mydiv''); div = div.parentNode; Element.clea...
2006 May 24
6
enumerables problem?
I was wondering whether anybody could please tell me why this is causing an error in IE (works in Firefox): $A(container.getElementsByTagName(''*'')).each( function(el) { Element.cleanWhitespace(el); }.bind(this)); What would be an alternative of achieving the same? Thank you Marco M. Jaeger | Url: http://mmjaeger.com <http://mmjaeger.com/> | E-mail: mail-yVS5avHIROZWk0Htik3J/w@public.gmane.org Do you need business consulting, webdesign or webhosting: please visit http://j...
2005 Jul 19
4
a frightfully newbish question about dragdrop.js
...reinstalled it yesterday to see if that helped..) the dragdrop demo page on script.aculo.us doesnt drag/drop. and returns these errors - the demo page works well in IE6 on load : Error: Event.observe is not a function Source File: http://script.aculo.us/scripts/dragdrop.js Line: 266 Error: Element.cleanWhitespace is not a function Source File: http://script.aculo.us/scripts/dragdrop.js Line: 429 Error: Element.cleanWhitespace is not a function Source File: http://script.aculo.us/scripts/dragdrop.js Line: 429 when using the code lifted directly from the pages as a local test (local copies of the 3 .js files...
2006 Jan 23
6
Performance Issues with Autocompleter
...his part, as I can live without the "Highlighting" effect. But this part is in my opinion not that scalable and may need improvement. <code snip> updateChoices: function(choices) { if(!this.changed && this.hasFocus) { this.update.innerHTML = choices; Element.cleanWhitespace(this.update); Element.cleanWhitespace(this.update.firstChild); if(this.update.firstChild && this.update.firstChild.childNodes) { this.entryCount = this.update.firstChild.childNodes.length; for (var i = 0; i < this.entryCount; i++) { var en...
2005 Nov 07
2
IE vs. Firefox - little programming help needed
...;IMG'')[0];" While IE correctly returns the image object, Firefox returns an error. What I discovered so far is that this.el.previousSibling returns the DIV tag an IE which is correct - however, Firefox returns this: #text. I was wondering whether there is some use of the prototype cleanWhitespace but I couldn''t make this to work yet. Does anybody see a workaround/. Thank you in advance for your help. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it''s FREE! http://messenger.msn.click-ur...
2006 May 30
0
problem with effect toggle - please help
...does anybody have an idea what''s causing this? thank you in advance for your help. // sidebar boxes Effect.SizeBox = Class.create(); Object.extend(Object.extend(Effect.SizeBox.prototype, Effect.Base.prototype), { initialize: function(element) { this.element = $(element); Element.cleanWhitespace(this.element); $A(this.element.getElementsByTagName(''*'')).each( function(el) { try { Element.cleanWhitespace(el); } catch (e) {} }); this.bContainer = this.element; this.bContainerId = this.bContainer.getAttribute(''id'');...
2006 Mar 17
6
Updated the xml code to be more object-oriented
...ass.create(); Object.extend(XMLDoc.prototype, { initialize: function (xmlDoc) { this.element = xmlDoc; }, asHash: function () { if (! this._xmlHash) { this._xmlHash = this._nodeToHash(this.element); } return this._xmlHash; }, _nodeToHash: function (node) { Element.cleanWhitespace(node); if ((node.attributes && node.attributes.length > 0) || (node.hasChildNodes() && node.childNodes[0].nodeType == 1)) { var localHash = {}; if (node.attributes && node.attributes.length >= 1) { $A(node.attributes).each(function (attr) { loca...
2006 Mar 14
2
slider.js in ruby on rails
Hello, Is anyone using slider.js from script.aculo.us? I don''t understand how to integrate it into a form in rails. I want to do something like adjust (slide) age from 16-100. Thank You, jeff
2006 Mar 17
10
good javascript xml parser
Anyone know of a javascript function that will take an xml document and turn it into an associative array? Basically it would take something like this: <body> <item> <id>1</id> <name>Bob</name> </item> <item> <id>2</id> <name>John</name> </item> </body> And turn it into something like this: {
2006 Mar 23
4
XML parser fixed
...s)}); }, parseXML: function (req) { this.element = req.responseXML; this.XMLParsed = this.asHash(); if(this.options.onComplete) { this.options.onComplete(this.XMLParsed); } }, _nodeToHash: function (node) { Element.cleanWhitespace(node); // // remove comments, firefox fix node = this._removeComments(node); if ((node.attributes && node.attributes.length > 0) || (node.hasChildNodes() && (node.childNodes[0].nodeType == 1 || node.childNodes[0].nodeType == 7))) { va...
2005 Jun 28
1
Thomas script.aculo.us (important bug and add ons)
...s only: false, hoverclass: null, onChange: function() {}, onUpdate: function() {} }.extend(arguments[1] || {}); $(element).sortable_tag = options.tag; // convenience for serializing $(element).sortable_onChange = options.onChange; Element.cleanWhitespace(element); // fixes Gecko engine Draggables.addObserver(new SortableObserver(element, options.onUpdate)); ---- In the class above, you create a function called onChange() which is a javascript function. Then you create a reference to onchange from an element in the DOM. $(element).sortable_on...
2006 Jun 20
10
Next script.aculo.us release, help needed
Hey there! I''m in the process of looking through the various bug reports and tickets and fixing script.aculo.us as I go along. As I want a 1.6.2 bugfix release to happen this week, please help me out with: - Looking throught the open bugs list on the trac, testing stuff and giving helpful comments (like "+1") - Identifiying what bugs/patches should be included (answer to
2005 Jul 20
3
examples of drag n drop
...rns these >>>> errors - the demo page works well in IE6 >>>> on load : >>>> >>>> Error: Event.observe is not a function >>>> Source File: http://script.aculo.us/scripts/dragdrop.js >>>> Line: 266 >>>> Error: Element.cleanWhitespace is not a function >>>> Source File: http://script.aculo.us/scripts/dragdrop.js >>>> Line: 429 >>>> Error: Element.cleanWhitespace is not a function >>>> Source File: http://script.aculo.us/scripts/dragdrop.js >>>> Line: 429 >>>&gt...
2006 Jan 13
5
Effect together with ...firstChild - can''t get it to work
Hi, I am relatively new to Rails and I can''t get the following to work: what I am trying to do is to make the first item of a list to flash: var item = $(''items'').firstChild; new Effect.Highlight(item); I get the this Javascript error message: this._base has no child (effects.js, line 445) But I am able to do this without any problems: var item =
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...= Class.create({ } this.oldElementValue = this.element.value; this.element.focus(); - + if (this.options.afterUpdateElement) this.options.afterUpdateElement(this.element, selectedElement); }, @@ -269,20 +269,20 @@ Autocompleter.Base = Class.create({ Element.cleanWhitespace(this.update.down()); if(this.update.firstChild && this.update.down().childNodes) { - this.entryCount = + this.entryCount = this.update.down().childNodes.length; for (var i = 0; i < this.entryCount; i++) { var entry = this.getEntry(i)...
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply to this email, as some of the replaced lines are too long, so git won't let me send the email. However, there is nothing wrong with that patch, and it should be applied in the sequence listed below. Note also that I assume this will be tested on a clean f11 install, rather than an upgrade of an existing ovirt server