[Proto-Scripty] cumulativeOffset() differs in ff IE
Hello, I am having trouble with this one. I have a div I use as a window positioned in the middle of the page. On that window I have a form. when filling out the inputs I have a dropdown that I fill with possible values for that input. The dropDown is a select element and I create it on the fly and append to the document.body. I use cumulativeOffset() to find the position of the input then position the dropdown object directly beneath it. This works great in ie7 8 beta, but in firefox cumulativeOffset() doesn't calculate the offset of the window Any thoughts? Thanks, Joschi --~--~-~--~~~---~--~~ 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: Opera Ctrl + click observing
Hi, Can you post a *minimalist* example demonstrating the problem to Pastie? http://pastie.org -- T.J. Crowder tj / crowder software / com On Dec 12, 9:57 am, Rauan Maemirov rauan1...@gmail.com wrote: Hi list. I'm trying to prevent Opera's image save dialog when clicking Ctrl + mouseclick. e.stop() doesn't help. It's just don't get to observer handler. Does anybody have workaround for this? --~--~-~--~~~---~--~~ 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] Opera Ctrl + click observing
Hi list. I'm trying to prevent Opera's image save dialog when clicking Ctrl + mouseclick. e.stop() doesn't help. It's just don't get to observer handler. Does anybody have workaround for this? --~--~-~--~~~---~--~~ 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: Opera Ctrl + click observing
Hi, You'll probably need to have that code wrapped in a dom:loaded handler or something for it to find the elements reliably. But even doing that, I'm not immediately having any success preventing Opera's default action. I tried hooking events on the image itself (rather than a parent) just in case. This page may be useful to you (depressing, but useful): http://unixpapa.com/js/mouse.html HTH, -- T.J. Crowder tj / crowder software / com On Dec 12, 1:52 pm, Rauan Maemirov rauan1...@gmail.com wrote: http://pastie.org/337589 I have specific task, so I need mouseup. But anyway if you would use click or mousedown and comment the alert anyway u'll get Save as dialog, otherwise it alerts text and stops event... On Dec 12, 6:34 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Can you post a *minimalist* example demonstrating the problem to Pastie?http://pastie.org -- T.J. Crowder tj / crowder software / com On Dec 12, 9:57 am, Rauan Maemirov rauan1...@gmail.com wrote: Hi list. I'm trying to prevent Opera's image save dialog when clicking Ctrl + mouseclick. e.stop() doesn't help. It's just don't get to observer handler. Does anybody have workaround for this? --~--~-~--~~~---~--~~ 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] problem: inserting html in each loop
Hi there, I have a weird problem. Imagine following html code: div class=test/div div class=test/div div class=test/div div class=test/div div class=test/div I want to insert other html-code inside all divs class=test: var html = document.createTextNode('test'); $$('.test').each(function(element) { element.appendChild(html); console.log(element); }); This javascript code is executed after the dom:loaded event is fired. The each function is executed 5 times, only html is appended only once (at the last div). If I exchange the line: element.appendChild(html); into: element.appendChild(document.createTextNode('test')); every div contains the text 'test' - Does anyone knows why it only works once with a variable? --~--~-~--~~~---~--~~ 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] SVN Structure
Hey Everyone, Granted this is off the topic of prototype development directly, it will lead into it in the end. I am writing an ajax library that i'd like to A) stand alone B) work with prototype and C) work with Extjs. I'd like to put the code in Google Code and have it available for checkout. Ideally I thought it would best to have all variations of the library under one repository but when thinking about the structure I couldn't decide how it would be best laid out. I'm sure this sort of thing has been done before, so anyone familiar with the best practices for this situation please post some advice. Regards, Matt --~--~-~--~~~---~--~~ 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: problem: inserting html in each loop
Hi Cyrus, The text node can only exist within one div, it's not a quantum particle happily living in superposition across all five. :-) It's getting appended five times, but each time the previous parent loses it: appendChild: Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.[1] [1] http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-184E7107 HTH, -- T.J. Crowder tj / crowder software / com On Dec 12, 3:00 pm, Cyrus arianglan...@googlemail.com wrote: Hi there, I have a weird problem. Imagine following html code: div class=test/div div class=test/div div class=test/div div class=test/div div class=test/div I want to insert other html-code inside all divs class=test: var html = document.createTextNode('test'); $$('.test').each(function(element) { element.appendChild(html); console.log(element); }); This javascript code is executed after the dom:loaded event is fired. The each function is executed 5 times, only html is appended only once (at the last div). If I exchange the line: element.appendChild(html); into: element.appendChild(document.createTextNode('test')); every div contains the text 'test' - Does anyone knows why it only works once with a variable? --~--~-~--~~~---~--~~ 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: Ajax.InPlaceCollectionEditor and overriding the default onComplete?
In case there was anyone wondering the answer to this, turns out there's an htmlResponse option that if you set to false, will turn off auto-updating of the element. Oddly, it wasn't listed in any of the script.aculo.us wiki entries On Dec 11, 6:54 pm, Warren warr...@gmail.com wrote: It seems like the Ajax.InPlaceCollectionEditor will automatically update the element with whatever the server response is. Is there any way to override this behavior? For example, let's say the response from the server is foo, but I want to update the element with the response value with the current date/time appended. I defined the onComplete option to set the element to the value that I want... however, I still see that the element first gets updated to the server response (foo), and then a split second later, my onComplete gets executed which updates the element again to what I want (foo + date/time). How do I prevent the default behavior from happening? Thanks! --~--~-~--~~~---~--~~ 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] dom:loaded observing question
I'm loading all my scripts almost at the bottom of html and right after them observing 'dom:loaded' event. But it initializes only when all content is loaded (including all images). Is it okay? How can i avoid that waiting all images loading? --~--~-~--~~~---~--~~ 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: dom:loaded observing question
Try loading at least Prototype up in the head of your page, and moving your dom:loaded observer up there right after it. That should get the effect you're after, where the script fires before the page is visible. Depending on what else you have going on in the way of external scripts, you may need to move them up before that point, but you should be able to do all sorts of things before the page becomes fully visible. Walter On Dec 12, 2008, at 3:59 PM, Rauan Maemirov wrote: I'm loading all my scripts almost at the bottom of html and right after them observing 'dom:loaded' event. But it initializes only when all content is loaded (including all images). Is it okay? How can i avoid that waiting all images loading? --~--~-~--~~~---~--~~ 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] Fade away problem (Newbie)
Hello everyone, I was wondering if someone might be able to help me. I have 4 links that toggle the opacity of 4 seperate divs, this works great I have the z-index swapping and the opacity fading. The Problem: When I select one section I want the remaining 3 divs to fade away. For example if I click a link it fades in and the 3 divs remaining that I did not select fade away. Any help is really appreciated. code looks something like this: !-- My slides where content fades in -- div id=slideWrap div id=slide-deck align=center p/p /div div id=fade-quicktime align=center pQUICKTIME/p /div div id=fade-flash align=center pFLASH/p /div div id=fade-smil align=center pSMIL/p /div div id=fade-windows align=center pWINDOWS/p /div /div !-- end slides -- !-- my categories, navigation that triggers content to fade in and out -- div class=slideNavigation !-- quicktime -- div id=quicktime a href=# onclick=Effect.toggle('fade- quicktime','appear'); return false; img alt=category 1 src=images/streamingSkin/logo.png //a h1Quick Time/h1 /div !-- flash -- div id=flash a href=# onclick=Effect.toggle('fade-flash','appear'); return false; img alt=category 1 src=images/streamingSkin/ logo.png //a h1Flash/h1 /div !-- SMIL -- div id=smil a href=# onclick=Effect.toggle('fade-smil','appear'); return false; img alt=category 1 src=images/streamingSkin/ logo.png //a h1SMIL/h1 /div !-- Windows Media -- div id=windows a href=# onclick=Effect.toggle('fade-windows','appear'); return false; img alt=category 1 src=images/streamingSkin/ logo.png //a h1Windows Media Player/h1 /div /div --~--~-~--~~~---~--~~ 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: Set the value of an input field ??
Hi, The line $(lang).value = this is a test; is fine. I suspect you may be calling it from inline script (your quoted code sample does, but I don't know if you were using shorthand). Until the DOM is fully loaded, referencing elements by ID is problematic -- e.g., doing so from inline script. The dom:loaded event[1] provided by Prototype can help. [1] http://prototypejs.org/api/document/observe Here's a page that successfully sets a hidden form field on load (using dom:loaded), and then queries it later when you click a button: http://pastie.org/338053 HTH, -- T.J. Crowder tj / crowder software / com On Dec 12, 7:34 pm, Joel Taylor joelatay...@gmail.com wrote: Ok, this seems so easy - but I'm having trouble setting a simple input field on my page. code input type=hidden name=lang id=lang value= / script $(lang).value = this is a test; /script /code --~--~-~--~~~---~--~~ 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] scriptaclous scrollTo effect in a div??
Hi, i really like the effect of scrollTo in scriptaclous, but how do i implement it in a div(overflow). Thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---