[Proto-Scripty] obtrusive even handlers not working in generated content

2008-10-29 Thread johnrails
Hi all, I'm having a small issue with generated content using prototype's Element object. Here's the gist of what i'm doing var para = new Element('p', {'class':'button',onclick:'alert(hello);'}).update(Alert You?); after i just insert this into a div on my page. When i go to the page i do get

[Proto-Scripty] How to clear event Autocompleter

2008-10-29 Thread Nueng
Hello my name Nueng (1) name in thai i want to know , when i use Autocompleter to create a event to Textfield. and i need to change option in Autocompleter function by dynamic value to option. Ex. i have 2 radio option, if user change i want to change option in Autocompleter var valSel = ””;

[Proto-Scripty] How and I read the position of a Draggable element during dragging?

2008-10-29 Thread Moe sweet
Hi I am using this. new Draggable('hueArrows',{ snap: function(x,y,draggable) { function constrain(n, lower, upper) { if (n upper) return upper;

[Proto-Scripty] Re: $$() and Element.observe() question

2008-10-29 Thread Robert Zotter
kimbaudi, Like you said, $$() returns and array of DOM elements. You just need to iterate over the collection and set up the observe event on each item. For example: $$('.class').each(function(element) { element.observe('click', function() { alert('clicked'); }); }); Cheers -- Robert

[Proto-Scripty] Dynamic loading problem in prototype for me

2008-10-29 Thread sara
Dear All, I am new to prototype framework. I am using IE 7.0 and Firefox 2.0.0.17 browsers. when i am using Ajax.Request, in IE the function calls only once,that is function works only for the first request. But it works very well with firefox. Can anyone help me to solve this issue. Thanks

[Proto-Scripty] Iframe issue with IE7 (probably 6)

2008-10-29 Thread Thomas A
Our application is built on a static interface with HTML controls and an Iframe that registers these controls and executes some actions on them with the help of prototype. This works rather well on all browsers, but if the source of the iframe changes IE has a problem with these controles and

[Proto-Scripty] Re: $$() and Element.observe() question

2008-10-29 Thread ColinFine
On Oct 29, 4:58 am, Robert Zotter [EMAIL PROTECTED] wrote: kimbaudi, Like you said, $$() returns and array of DOM elements. You just need to iterate over the collection and set up the observe event on each item. For example: $$('.class').each(function(element) {  

[Proto-Scripty] Re: obtrusive even handlers not working in generated content

2008-10-29 Thread T.J. Crowder
Hi, I know doing event handlers like this is bad, bad, and frowned upon, but even if i do it unobtrusively it still doesn't work in IE6 or 7. I don't know what the problem with the obtrusive one is, but I'm guessing this will address the issue with doing the unobtrusive version where you use

[Proto-Scripty] Re: Dynamic loading problem in prototype for me

2008-10-29 Thread T.J. Crowder
Hi, Can you create a small, stand-alone example and put it on Pastie[1]? I'm afraid I'm not understanding what you're trying to do and what's not working about it. [1] http://pastie.org -- T.J. Crowder tj / crowder software / com On Oct 29, 7:30 am, sara [EMAIL PROTECTED] wrote: Dear All, I

[Proto-Scripty] How do you update text boxes in the container you're dragging

2008-10-29 Thread tecmo
onHover: function(element, dropon, overlap) { if(overlap0.5) { Sortable.mark(dropon, 'before'); if(dropon.previousSibling != element) { var oldParentNode = element.parentNode; element.style.visibility = hidden; // fix gecko rendering

[Proto-Scripty] Re: obtrusive even handlers not working in generated content

2008-10-29 Thread Jonathan Rosenberg
I'm still quite new to Prototype, but I think you're missing some quotes in your code below. What you have now is var para = new Element('p', {'class':'button',onclick:'alert(hello);'}).update(Alert You?); Shouldn't it be var para = new Element('p',

[Proto-Scripty] Re: obtrusive even handlers not working in generated content

2008-10-29 Thread Jarkko Laine
On 29.10.2008, at 16.26, Jonathan Rosenberg wrote: I'm still quite new to Prototype, but I think you're missing some quotes in your code below. What you have now is var para = new Element('p', {'class':'button',onclick:'alert(hello);'}).update(Alert You?);

[Proto-Scripty] Re: Iframe issue with IE7 (probably 6)

2008-10-29 Thread Matt Foster
Are you holding a reference to an object inside the iframe? Such as contentDocument/contentWindow. These references would be bunk once the iframe refreshes. On Oct 29, 4:31 am, Thomas A [EMAIL PROTECTED] wrote: Our application is built on a static interface with HTML controls and an Iframe

[Proto-Scripty] Re: obtrusive even handlers not working in generated content

2008-10-29 Thread T.J. Crowder
Hi, var al = function() {alert(Hello); } var para = new Element('p', {class: 'button'}).update(Alert you?); para.observe('click', al); Doesn't this work in ie (after you add the paragraph to the DOM)? As you say, you have to give the browser a moment to get it into the DOM after adding it.

[Proto-Scripty] Re: Iframe issue with IE7 (probably 6)

2008-10-29 Thread Thomas A
The reference is the other way round. The Iframe content references for example buttons or divs of the surrounding html page. And if the iframe reloads or changes the page, it tries to rereference these elements but fails on IE. --~--~-~--~~~---~--~~ You received

[Proto-Scripty] New Script.aculo.us combination effect: Wipe (beta)

2008-10-29 Thread Diodeus
After being annoyed by a Flash-based solution for the same functionality, I decided to write a wipe effect for Scriptaculous. It's in beta, and not quite ready for release. new Effect.Wipe('content',{'newImg':'Images/Wipe3.jpg',duration: 2,mode:'vSplit'}) Modes: Vertical split Horizontal split

[Proto-Scripty] Re: obtrusive even handlers not working in generated content

2008-10-29 Thread johnrails
Thanks for the reply, T.J. i'm going to read through that article. Hopefully i can figure this out. John On Oct 29, 2:38 am, T.J. Crowder [EMAIL PROTECTED] wrote: Hi, I know doing event handlers like this is bad, bad, and frowned upon, but even if i do it unobtrusively it still doesn't

[Proto-Scripty] Re: Iframe issue with IE7 (probably 6)

2008-10-29 Thread Matt Foster
Very strange, not sure if i understand completely. So there is an internal iFrame object that is getting references from its containing document object. When the iframe reloads it no longer has these references? Wouldn't a reload of the iframe force it to retrieve fresh references as everything

[Proto-Scripty] Event.observe working in Firefox but not IE6-7

2008-10-29 Thread Dave
As the subject says I have the follow js: Event.observe('events', 'change', function (e) { new Ajax.Updater('event_details', 'URL', { method: 'post', parameters: 'event=' + e.element().id.gsub('event', '') }); });

[Proto-Scripty] Re: Iframe issue with IE7 (probably 6)

2008-10-29 Thread Gabriel Gilini
Thomas, Some sample code and HTML would help immensely. Cheers Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Wed, Oct 29, 2008 at 5:37 PM, Matt Foster [EMAIL PROTECTED] wrote: Very strange, not sure if i understand completely. So there is an internal iFrame object

[Proto-Scripty] Zebra Stripes

2008-10-29 Thread solidhex
I am trying to figure out a way to zebra stripe list items in an unordered list. The only tricky part is that I don't want to zebra stripe the nested lists, but I want to maintain the same every other stripping pattern on the nested list's parent. Here is an example of the structure that I want

[Proto-Scripty] Re: New Script.aculo.us combination effect: Wipe (beta)

2008-10-29 Thread Baglan
Cool effects! There's one tiny thing: when using 'HorizontalSplit', 1px-high part of the original image shows thru. - Baglan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post

[Proto-Scripty] curry Misunderstanding?

2008-10-29 Thread Hook
I have a function that contains the following statement: sendState(email, $F('save-comments'), function () { sph.fire(doneEvent); }); The last argument is a function that gets called from within sendState. This works fine. But when I change this to

[Proto-Scripty] Re: Zebra Stripes

2008-10-29 Thread RobG
On Oct 30, 9:46 am, solidhex [EMAIL PROTECTED] wrote: I am trying to figure out a way to zebra stripe list items in an unordered list. The only tricky part is that I don't want to zebra stripe the nested lists, but I want to maintain the same every other stripping pattern on the nested

[Proto-Scripty] Re: Zebra Stripes

2008-10-29 Thread solidhex
Ha, I KNEW I was overlooking something. The benefits of lacking sleep. Thanks Rob! On Oct 29, 6:05 pm, RobG [EMAIL PROTECTED] wrote: On Oct 30, 9:46 am, solidhex [EMAIL PROTECTED] wrote: I am trying to figure out a way to zebra stripe list items in an unordered list. The only tricky part