[Proto-Scripty] Extreme beginner
Hi all. Greetings. I am extreme beginner in this field. I am using CodeIgniter though, I don't know how to incorporate script aculos and prototype in it. Can u forward me a tutorial or something similar. Thank you. --~--~-~--~~~---~--~~ 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.observer with mouseup?
Hi, I'm new to protocoljs, but it's this thing I'm trying to do, and it doesn't work. It drives me mad. Anyway, I try to do this with protocoljs: body onmouseup=alert('hi'); This was how I wrote it, but it doesn't work: Event.observer(window,'mouseup',alert('hi')); What is the right way to do it? Thank you! --~--~-~--~~~---~--~~ 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] Re: Calling other website server url
Nope. Google single origin policy for the reason why. Walter On Jan 2, 2009, at 3:02 AM, Jagan wrote: I want to call different website url in ajax.request method. is it possible? is there any way to call Ex: i am in xyz.com/home.jsp. In this page i want to call new Ajax.Request('http://www.abc.com/result.jsp?id=1001') --~--~-~--~~~---~--~~ 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] Re: IE and Element#up
Hi Joris, I felt a bit stupid asking such a basic question is there some documentation on these kinds of differences per browser? No need to feel stupid, we're all new at some point. I found when starting out with Prototype that it paid me back very well indeed to read the API from beginning to end. It takes just a couple of hours, and you get that time back almost immediately being saved from doing things the wrong way or running into things like this. (This particular issue is discussed in the How Prototype Extends the DOM page[1], which is linked from the documentation of the Element class[2].) This suggestion of reading through the API is one of several listed under How do I learn Prototype in the FAQ on the unofficial Prototype script.aculo.us wiki.[3] [1] http://prototypejs.org/learn/extensions [2] http://prototypejs.org/api/element/ [3] http://proto-scripty.wikidot.com/faq#learn HTH, -- T.J. Crowder tj / crowder software / com On Jan 2, 4:23 pm, Joris wijlens joriswijl...@gmail.com wrote: Matt, 2009/1/2 Matt Foster mattfoste...@gmail.com Its because FF allows for native prototype extension and IE does not, such that any referenced element won't have proto's element extension methods until its been explicitly extended. a href=# onclick=$(this).up('.bla').remove()Back/a this works thank you very much But to be honest I wouldn't use that style of event listener, try something like this... $$(.bla a).invoke(observe, click, function(e){ e.element().up(.bla).remove(); }); -- http://positionabsolute.net On Jan 1, 5:43 pm, joris77 joriswijl...@gmail.com wrote: Hi, This works in firefox but it doesn't in internet explorer 7 is this an issue or am I missing something? html head script src=prototype.js type=text/javascript/script /head body div class=bla a href=# onclick=this.up('.bla').remove()Back/a /div /body /html Thanks anyway I felt a bit stupid asking such a basic question is there some documentation on these kinds of differences per browser? -- Met vriendelijke groet, Joris Wijlens Tel. 06-28419140 --~--~-~--~~~---~--~~ 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] Re: Event.observer with mouseup?
Hi Per, This was how I wrote it, but it doesn't work: Event.observer(window,'mouseup',alert('hi')); There are a couple of problems with that code. First, you're calling Event.observer (with an 'r' at the end); the method is Event.observe (no 'r'). The second problem is that you're calling the alert() method and then passing its result into the Event.observe call. You want to pass a reference to a function object to Event.observe instead. (You can do this in many ways. One common way is to wrap the code in an anonymous function declaration. For anything of any size, I recommend named functions instead.) There are lots of examples of event handlers, with discussion, on the unofficial Prototype script.aculo.us wiki: http://proto-scripty.wikidot.com. Look under Prototype Tips. HTH, -- T.J. Crowder tj / crowder software / com On Jan 2, 6:30 pm, Per classon...@gmail.com wrote: Hi, I'm new to protocoljs, but it's this thing I'm trying to do, and it doesn't work. It drives me mad. Anyway, I try to do this with protocoljs: body onmouseup=alert('hi'); This was how I wrote it, but it doesn't work: Event.observer(window,'mouseup',alert('hi')); What is the right way to do it? Thank you! --~--~-~--~~~---~--~~ 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] Re: Event.observer with mouseup?
Try doing this instead: //put the following in a script block near the bottom of your html var foo = function(){ alert('howdy') }; Event.observe(window,'mouseup',foo); Note that the function is called Event.observe, not Event.observer. Also any reference to a function inside of an observer needs to be in the form of an anonymous function, not a literal function itself. You could have done this as well: Event.observe(window,'mouseup',function(){alert('howdy')}); It's a subtle distinction, but it becomes much more important in a non- trivial example, because an anonymous function won't get its input variables (and won't be called, either) until it is invoked. Then it uncloaks, does its business, and vanishes again. Walter On Jan 2, 2009, at 1:30 PM, Per wrote: Hi, I'm new to protocoljs, but it's this thing I'm trying to do, and it doesn't work. It drives me mad. Anyway, I try to do this with protocoljs: body onmouseup=alert('hi'); This was how I wrote it, but it doesn't work: Event.observer(window,'mouseup',alert('hi')); What is the right way to do it? Thank you! --~--~-~--~~~---~--~~ 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] Re: Event.observer with mouseup?
Also any reference to a function inside of an observer needs to be in the form of an anonymous function, not a literal function itself. Doesn't have to be anonymous. Named functions are fine: function myMouseUpThingy() { alert('Howdy'); } // later Event.observe(window, 'mouseup', myMouseUpThingy); The critical thing is that you need to pass in a function *reference*. -- T.J. On Jan 3, 4:45 pm, Walter Lee Davis wa...@wdstudio.com wrote: Try doing this instead: //put the following in a script block near the bottom of your html var foo = function(){ alert('howdy') }; Event.observe(window,'mouseup',foo); Note that the function is called Event.observe, not Event.observer. Also any reference to a function inside of an observer needs to be in the form of an anonymous function, not a literal function itself. You could have done this as well: Event.observe(window,'mouseup',function(){alert('howdy')}); It's a subtle distinction, but it becomes much more important in a non- trivial example, because an anonymous function won't get its input variables (and won't be called, either) until it is invoked. Then it uncloaks, does its business, and vanishes again. Walter On Jan 2, 2009, at 1:30 PM, Per wrote: Hi, I'm new to protocoljs, but it's this thing I'm trying to do, and it doesn't work. It drives me mad. Anyway, I try to do this with protocoljs: body onmouseup=alert('hi'); This was how I wrote it, but it doesn't work: Event.observer(window,'mouseup',alert('hi')); What is the right way to do it? Thank you! --~--~-~--~~~---~--~~ 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] Re: Extreme beginner
GIYF: http://codeigniter.com/wiki/AJAX_for_CodeIgniter/ Walter On Jan 2, 2009, at 5:39 AM, openrijal wrote: Hi all. Greetings. I am extreme beginner in this field. I am using CodeIgniter though, I don't know how to incorporate script aculos and prototype in it. Can u forward me a tutorial or something similar. Thank you. --~--~-~--~~~---~--~~ 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] Re: Calling other website server url
Nope. Google single origin policy for the reason why. Or same origin policy. Here's the top hit when you do: http://en.wikipedia.org/wiki/Same_origin_policy HTH, -- T.J. Crowder tj / crowder software / com On Jan 3, 4:37 pm, Walter Lee Davis wa...@wdstudio.com wrote: Nope. Google single origin policy for the reason why. Walter On Jan 2, 2009, at 3:02 AM, Jagan wrote: I want to call different website url in ajax.request method. is it possible? is there any way to call Ex: i am in xyz.com/home.jsp. In this page i want to call new Ajax.Request('http://www.abc.com/result.jsp?id=1001') --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---