[Moo] Re: auto refresh the page

2010-02-11 Thread Deepali
Thanks for your reply sanford. here is my code- window.addEvent('domready', function() { $("content").load.periodical(5000,this,'test.php'); }); Loading content... If i use only core file getting the same error which i was getting earlier. and when i used "core-yc" getting the followin

[Moo] Sortables (and Drag.Move) inside an IFrame

2010-02-11 Thread Avital Oliver
Friends, When one uses Sortables inside an iframe and an element gets dragged out of the iframe its in and then the mouse is let go weird stuff happens (when you go back into the inframe it thinks the mouse is still clicked). This seems like it shouldn't be hard to fix and I'm willing to go on and

Re: [Moo] Re: auto refresh the page

2010-02-11 Thread Sanford Whiteman
> Error: window.addEvent is not a function > Source File:../autorefresh.php http://mootools.net/docs/core/Utilities/DomReady If you can't run the example code, you aren't including MT correctly + this issue is way beyond (or beneath) auto-refreshing. -- S.

[Moo] Re: auto refresh the page

2010-02-11 Thread Deepali
Hello Gary, Still its not working. getting the following error Error: window.addEvent is not a function Source File:../autorefresh.php Line: 6 On Feb 11, 8:15 pm, Gary Hussey wrote: > yeah, I'm sorry that was sloppy of me. Thierry is correct it should have > been "window.addEvent(". > > On Thu,

Re: [Moo] Firefox 3.6 Browser Detection

2010-02-11 Thread Eneko Alonso
You cloud check if the browser is Gecko and if it has onhashchange in the window object (FF3.6 does) Of course, that is temporary and won't differentiate FF3.6 from newer versions. if ("onhashchange" in window) ... 2010/2/11 Fábio M. Costa > Hi SamGoody, > > you could use this plugin for thi

Re: [Moo] implementing a count method

2010-02-11 Thread אריה גלזר
well, i made some more modifications and made this a gist. not sure if this is forge material... This is the main logic i applied: return the length for any variable that has a distinguishable length (Array,Object,String,Number). for other types return: - Window,

[Moo] Re: Event Delegation - getting the index of the elements

2010-02-11 Thread Rolf -nl
Well, if you're doing a Q/A thing than I think a DL list with DT = Q and DD = A is even more semantic, better looking, whatever.. But then, if you read the specs, a DD shouldn't contain much else than text, but that's mainly the case with Q/A's anyway. I've done things both ways, but most of the t

Re: [Moo] implementing a count method

2010-02-11 Thread אריה גלזר
as i said, this is just a thought. The best use case i can think of is something like this: function doSomething(obj){ if ($count(obj)){ //if the object is empty or undefined or anything falsy }else{ //if the object is useful } } 2 places where i can see thins as useful: 1.

Re: [Moo] Re: Load dynamically created web page into div

2010-02-11 Thread Fábio M . Costa
Dial, Please creat a mootools shell (http://mootools.net/shell/) with your code, it will 10 times easier for us to help you. It's super simple youll see. The code looks fine, but i cant run it so its hard to find the problems and give you the fix. -- Fábio Miranda Costa Solucione Sistemas Engenh

Re: [Moo] Firefox 3.6 Browser Detection

2010-02-11 Thread Fábio M . Costa
Hi SamGoody, you could use this plugin for this kind of "browser support detection" (?). http://mootools.net/forge/p/moomodernizr Maybe you could just grab the code corresponding to the gradient detection, so you dont need to include it all. Hope it helps. Ciao. -- Fábio Miranda Costa Solucion

Re: [Moo] implementing a count method

2010-02-11 Thread Fábio M . Costa
I think that your function looks fine, ive just changed some little stuff: http://www.jsfiddle.net/tvYQT/3/ i think you need to use getLength() (not sure) on the hash for example. But if you could explain us why you need this kind of functionality, and whats the problem your having, maybe we cou

Re: [Moo] Re: outerHTML

2010-02-11 Thread Fábio M . Costa
you guys are joking with each other right? haha And dont disrespect IE here in this mail list or you'll get kicked. :D -- Fábio Miranda Costa Solucione Sistemas Engenheiro de interfaces On Thu, Feb 11, 2010 at 3:49 PM, Trevor Orr wrote: > Thanks for the info, that sounds like it should work a

[Moo] Firefox 3.6 Browser Detection

2010-02-11 Thread SamGoody
In FF3.6 Browser.Engine.version returns 19. I assume this corresponds to gecko version 1.9[.2], and was the same in Firefox 3.5 (Gecko 1.9.1). Is that correct? If so, how do I target 3.6 only? (I must provide gradients if the browser does not handle the css).

[Moo] Re: Clone childNodes (textNodes included)

2010-02-11 Thread Lorenzo De Tomasi
Thanks :-) But I would like to clone the children of element, not of and obtain: one, two Thank you again

Re: [Moo] Clone childNodes (textNodes included)

2010-02-11 Thread אריה גלזר
http://www.jsfiddle.net/dtZqr/ --- אריה גלזר 052-5348-561 5561 On Thu, Feb 11, 2010 at 20:40, Lorenzo De Tomasi wrote: > > http://url.com";> > one, two > > > >

[Moo] Clone childNodes (textNodes included)

2010-02-11 Thread Lorenzo De Tomasi
Ciao, how can I clone and append all the childNodes of an element (textNodes included)? HTML: http://url.com";> one, two Resulting HTML: http://url.com";> one, two one, two [", " included] Thank you very much :-)

[Moo] implementing a count method

2010-02-11 Thread אריה גלזר
i've been playing around with implementing a count method in JS, that will return the length of a given variable, no matter what it's type is. this is mainly useful for switching between array/object/string, but also might be interesting to see it work with elements. obviously, the main problem is

Re: [Moo] Re: outerHTML

2010-02-11 Thread Trevor Orr
Thanks for the info, that sounds like it should work and an easy way to get what I need. When I said great fucntionality I meant that one function (outerHTML) not the browser itself. I am by no means a fan of IE. On Thu, Feb 11, 2010 at 4:27 AM, SamGoody wrote: > Create a hidden div, clone t

[Moo] Re: Load dynamically created web page into div

2010-02-11 Thread Dial
This is the main calling page. I assume I need to include the jquery library and flot library on this page as well? Its currently making the call to the page(seen in firebug) but does not display anything. 24hr is the jquery/flot page. Im a bit confused what I need to wrap the function around.

Re: [Moo] Re: auto refresh the page

2010-02-11 Thread Gary Hussey
yeah, I'm sorry that was sloppy of me. Thierry is correct it should have been "window.addEvent(". On Thu, Feb 11, 2010 at 12:54 AM, Thierry bela nanga wrote: > Hello, > > javascript is a case sentitive language, > > you wrote window.addevent instead of window.*addEvent, *that's why you > have tha

Re: [Moo] Re: Event Delegation - getting the index of the elements

2010-02-11 Thread Roman Land
Its possibly more useful when the developing team is a one man show, but you still leave your HTML to be edited by other members of the team. Also, I like being dependent on as few entities as possible, so when you want to change something its a breeze. IMO, in this case HTML provides the unsorte

Re: [Moo] Re: Event Delegation - getting the index of the elements

2010-02-11 Thread אריה גלזר
i disagree with your assumption that the use of the id attribute is an html->js markup. It is good for semantic purposes. it is also important for accessibility. this specific use case for example, is not about html->js markup. giving questions and answers unique ids that correlate with each other

Re: [Moo] Re: Event Delegation - getting the index of the elements

2010-02-11 Thread Roman Land
As mentioned by other member of this group, utilizing the elements (id class etc.. ) attributes can and will cause issues when other developers (and especially designers) are also working with the same code. It is also my personal preference to minimize HTML -> JS markup, html & JS code stays clea

[Moo] Re: outerHTML

2010-02-11 Thread SamGoody
Create a hidden div, clone the element you need into it, get the innerHtml of the parent. var copy = $('whatIneedTheOuterHtmlOf').clone(); var Outer = new Element('div').adopt(copy); var theHtml = Outer.get('html'); Outer.destroy(); Done from memory, but I think that's correct. But, please don't

[Moo] Re: Why don't we create a Mootools IDE

2010-02-11 Thread Ren Yushiro
The @lends tag looks promising. But Aptana doesn't support this tag. It seems like Aptana used something like ScriptDoc, not JSDoc Toolkit. I will try Zend Studio later zz

Re: [Moo] Modify URL

2010-02-11 Thread Davor Ilic
i am using digitarald's history manager. 2010/2/11 אריה גלזר > HistoryManager uses moo 1.2.4. are you encountering this error on the demo > page? > i suspect that this class cannot work properly in mooshell as it's working > on the window.hash and the window.hash the library is working on in mo

Re: [Moo] Re: Event Delegation - getting the index of the elements

2010-02-11 Thread אריה גלזר
i can't see the problem. Assigning IDs isn't inefficient. We use classes for elements that don't specifically require a unique identity, or elements that might have multiple appearances with the same behavior. Another use case is when we want to generalize a behavior to a wide variety of html struc

[Moo] Re: Event Delegation - getting the index of the elements

2010-02-11 Thread cbolson
> actually, i think the most efficient way to do this is to mark the questions > and answers with grouped id's: > > > > > and then you could do: > > a_id = 'a'+this.get('id').substr(1); Funnily enough that is the way I "used" to do it - ie assigning unique id's to all the questions and answerd

Re: [Moo] Modify URL

2010-02-11 Thread אריה גלזר
HistoryManager uses moo 1.2.4. are you encountering this error on the demo page? i suspect that this class cannot work properly in mooshell as it's working on the window.hash and the window.hash the library is working on in mooshell will be the iframe. that beeing said, i have no idea where the er

Re: [Moo] Re: Event Delegation - getting the index of the elements

2010-02-11 Thread אריה גלזר
actually, i think the most efficient way to do this is to mark the questions and answers with grouped id's: and then you could do: a_id = 'a'+this.get('id').substr(1); this is much simpler and more efficient than creating an array of all answers and question, and IMO more semantic as well. if