[Proto-Scripty] script.aculo.us compare Jquery UI
Today I read the JQuery UI 1.7 http://jqueryui.com/demos/ I found that their document is clear, their demo has been cover most of the cases. For example Draggable, Droppable. It is really convenient for the developer. I remeber that about 1 to 2 years before, script.aculo.us has been developed the same things already. So I goto read script.aculo.us. Sadly I found many broken link. http://wiki.github.com/madrobby/scriptaculous/style-guide the wiki always show javascript error in IE7, the numbers of demo is few, it haven't cover most of the case. I can't see any improvement of the website. I support Prototype espically their OO style but it let me down again. --~--~-~--~~~---~--~~ 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-scriptaculous@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 -~--~~~~--~~--~--~---
[Proto-Scripty] $F() cannot get radio button values?
I have a simple question, is $F() cannot get radio button values? Should I use the old method document.form.xxx[0].checked to check the value??? --~--~-~--~~~---~--~~ 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-scriptaculous@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 -~--~~~~--~~--~--~---
[Proto-Scripty] event order part2
I have post a question before http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/e7c9e808777c8ba7/f2af8212bc699643?lnk=gst&q=event+order#f2af8212bc699643 I would like to solve this problem accroding to this site https://mootools.lighthouseapp.com/projects/2706/tickets/35-ie-s-attachevent-ff-s-addeventlistener-and-event-fire-order (this is mootools not prototypejs) but sadly it is not work in my case, does anyone know the reason??? $('testobj').observe("widget:frobbed", function(){alert("1");}); $('testobj').observe("widget:frobbed", function(){alert("2");}); $('testobj').observe('click',function(){$('testobj').fire ("widget:frobbed", { widgetNumber: 19 }); }); -- 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.
[Proto-Scripty] readAttribute problem
Dear sir, the following is the offical example of read attribute. But would you tell me how to make it return the text 'Prototype'? Prototype $('tag').readAttribute('href'); // -> '/tags/prototype' $('tag').readAttribute('title'); // -> 'view related bookmarks.' $('tag').readAttribute('my_widget'); // -> 'some info.' I have try $('tag').readAttribute('text'); // -> 'null' $('tag').readAttribute(innerHTML); // -> 'null' but both of them not work. -- 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.
[Proto-Scripty] Element.fire event order
Dear all I have try to use the element.fire to trigger 2 event var FCK = Class.create({ initialize:function(id){ document.observe('FCK:completed', this.func1.bindAsEventListener(this)); document.observe('FCK:completed', this.func2.bindAsEventListener(this)); }, func1:function(){ alert('1'); }, func2:function(){ alert('2'); } } in FF the sequence is prompt '1' and then '2' but in IE the sequence is prompt '2' and then '1' and how can I control the sequence?? Regards Victor --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Element.fire event order
thanks, you are correct, finally I find a solution from here http://mootools.lighthouseapp.com/projects/2706/tickets/35-ie-s-attachevent-ff-s-addeventlistener-and-event-fire-order On Sep 22, 5:04 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote: > Hi, > > As far as I'm aware the order in which event handlers are triggered is > implementation-dependent (and I don't think IE is quite as reliable as > it seems, it's not always last-in-first-fired). The only way you can > be sure of the order is to register only a single handler and have > that handler trigger other handlers in a known order (which is easy > enough). Event.observe doesn't do that, it relies on the underlying > event implementation of the browser. > > A little Googling on, say, "addEventListener order" or "attachEvent > order" (both without the quotes) will bring you lots of info about > event order peculiarities. > > FWIW, > -- > T.J. Crowder > tj / crowder software / com > > On Sep 22, 9:36 am, vtsuper <[EMAIL PROTECTED]> wrote: > > > > > Dear all > > > I have try to use the element.fire to trigger 2 event > > > var FCK = Class.create({ > > initialize:function(id){ > > document.observe('FCK:completed', > > this.func1.bindAsEventListener(this)); > > document.observe('FCK:completed', > > this.func2.bindAsEventListener(this)); > > }, > > func1:function(){ > > alert('1'); > > }, > > func2:function(){ > > alert('2'); > > } > > > } > > > in FF the sequence is prompt '1' and then '2' > > but in IE the sequence is prompt '2' and then '1' > > > and how can I control the sequence?? > > > Regards > > Victor- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com 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 -~--~~~~--~~--~--~---
[Proto-Scripty] passing parameter
Dear all, I have a small question. when should I pass parameter by variables? var test = new Frm('frm1','post','testing.php'); and when should I pass parameter by object? var test = new Frm({id:'frm1',method:'post',url:'testing.php'}); Regards, Victor --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: passing parameter
yes...this is my question "Or are you asking which style to use when you're defining your own functions and classes? " Both ways should be doing the same things...but what I want to know is what is the prototypejs developer will suggest us to use. On Nov 6, 8:52 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote: > Hi Victor, > > It depends entirely on what you're calling and how it's expecting to > receive them. When calling an element's observe() method, for > instance, this works: > > myelement.observe('click', function(evt) { /* ... */ }); > > ...but this doesn't: > > myelement.observe({ > eventName: 'click', > handler: function(evt) { /* ... */ } > }); > > ...because observe() doesn't expect to receive an object for its > paramters. But some other things, such as Ajax.Request, expect to > receive some of their information that way. It's all down to the > thing you're dealing with. > > Or are you asking which style to use when you're defining your own > functions and classes? > > HTH, > -- > T.J. Crowder > tj / crowder software / com > > On Nov 6, 11:38 am, vtsuper <[EMAIL PROTECTED]> wrote: > > > > > Dear all, > > > I have a small question. when should I pass parameter by variables? > > var test = new Frm('frm1','post','testing.php'); > > > and when should I pass parameter by object? > > var test = new Frm({id:'frm1',method:'post',url:'testing.php'}); > > > Regards, > > Victor- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: passing parameter
Dear all, any new ideas about this question Victor On 11月7日, 上午12時53分, vtsuper <[EMAIL PROTECTED]> wrote: > yes...this is my question > "Or are you asking which style to use when you're defining your own > functions and classes? " > > Both ways should be doing the same things...but what I want to know is > what is the prototypejs developer will suggest us to use. > > On Nov 6, 8:52 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote: > > > > > Hi Victor, > > > It depends entirely on what you're calling and how it's expecting to > > receive them. When calling an element's observe() method, for > > instance, this works: > > > myelement.observe('click', function(evt) { /* ... */ }); > > > ...but this doesn't: > > > myelement.observe({ > > eventName: 'click', > > handler: function(evt) { /* ... */ } > > }); > > > ...because observe() doesn't expect to receive an object for its > > paramters. But some other things, such as Ajax.Request, expect to > > receive some of their information that way. It's all down to the > > thing you're dealing with. > > > Or are you asking which style to use when you're defining your own > > functions and classes? > > > HTH, > > -- > > T.J. Crowder > > tj / crowder software / com > > > On Nov 6, 11:38 am, vtsuper <[EMAIL PROTECTED]> wrote: > > > > Dear all, > > > > I have a small question. when should I pass parameter by variables? > > > var test = new Frm('frm1','post','testing.php'); > > > > and when should I pass parameter by object? > > > var test = new Frm({id:'frm1',method:'post',url:'testing.php'}); > > > > Regards, > > > Victor- Hide quoted text - > > > - Show quoted text -- 隱藏被引用文字 - > > - 顯示被引用文字 - --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: passing parameter
here are the third style var test = new Frm('frm1',{method:'post',url:'testing.php'}); var test = new Frm('frm1','post','testing.php'); var test = new Frm({id:'frm1',method:'post',url:'testing.php'}); which style that the prototypejs developer suggest us to use?? On 11月8日, 上午10時53分, vtsuper <[EMAIL PROTECTED]> wrote: > Dear all, > > any new ideas about this question > > Victor > > On 11月7日, 上午12時53分, vtsuper <[EMAIL PROTECTED]> wrote: > > > > > yes...this is my question > > "Or are you asking which style to use when you're defining your own > > functions and classes? " > > > Both ways should be doing the same things...but what I want to know is > > what is the prototypejs developer will suggest us to use. > > > On Nov 6, 8:52 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote: > > > > Hi Victor, > > > > It depends entirely on what you're calling and how it's expecting to > > > receive them. When calling an element's observe() method, for > > > instance, this works: > > > > myelement.observe('click', function(evt) { /* ... */ }); > > > > ...but this doesn't: > > > > myelement.observe({ > > > eventName: 'click', > > > handler: function(evt) { /* ... */ } > > > }); > > > > ...because observe() doesn't expect to receive an object for its > > > paramters. But some other things, such as Ajax.Request, expect to > > > receive some of their information that way. It's all down to the > > > thing you're dealing with. > > > > Or are you asking which style to use when you're defining your own > > > functions and classes? > > > > HTH, > > > -- > > > T.J. Crowder > > > tj / crowder software / com > > > > On Nov 6, 11:38 am, vtsuper <[EMAIL PROTECTED]> wrote: > > > > > Dear all, > > > > > I have a small question. when should I pass parameter by variables? > > > > var test = new Frm('frm1','post','testing.php'); > > > > > and when should I pass parameter by object? > > > > var test = new Frm({id:'frm1',method:'post',url:'testing.php'}); > > > > > Regards, > > > > Victor- Hide quoted text - > > > > - Show quoted text -- 隱藏被引用文字 - > > > - 顯示被引用文字 -- 隱藏被引用文字 - > > - 顯示被引用文字 - --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: passing parameter
thank you for your informationI think Ihave to rewrite most of my object...thanks anyway On Nov 9, 12:50 pm, kangax <[EMAIL PROTECTED]> wrote: > On Nov 8, 12:23 am, vtsuper <[EMAIL PROTECTED]> wrote: > > > here are the third style > > > var test = new Frm('frm1',{method:'post',url:'testing.php'}); > > > var test = new Frm('frm1','post','testing.php'); > > > var test = new Frm({id:'frm1',method:'post',url:'testing.php'}); > > > which style that the prototypejs developer suggest us to use?? > > It's all about doing what makes more sense in your particular > situation : ) > If your function needs more than 2-3 arguments, it's a good idea to > replace them with one object. Javascript's objects are unordered > collections, which makes them an ideal candidate for passing data in > *any* order: > > someFunction({ foo: 1, bar: 2 }); > // is identical in its effect to > someFunction({ bar: 2, foo: 1 }); > > while: > > someFunction(1, 2); > someFunction(2, 1); > > could easily differ. > > Some of prototype.js methods follow a pattern of having an optional > `options` parameter. This parameter is meant to be an object and is > usually the last one (as it makes it easy to omit it). `Ajax.Request` > is a good example. > > In your particular case, try only leaving required data as actual > arguments and put the rest into an optional object: > > var Frm = Class.create({ > options: { > method: 'post' > }, > initialize: function(element, url, options) { > this.element = $(element); > if (!this.element) throw Error('element is required'); > this.url = url; > id (!this.url) throw Error('url is required'); > this.options = Object.extend( > Object.clone(this.options), > options || { } > ); > // ... > } > > }); > > [...] > > -- > kangax --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com 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 -~--~~~~--~~--~--~---