[Proto-Scripty] Prevent element from flickering on hovering
Hello, At http://remcobohle.mwierda.blackpearl.minus3.nl/flickering.html I'm trying to accomplish the following. I have a list of images positioned next to each other using a table. Each image has a caption, using a DIV element, that I want to display only when the user hovers over the image. Everything works as expected really, but when the user hovers the image AND the caption (e.g. by moving the cursor over the bottom of the image) a rather distracting flickering effect appears, that I would like to get rid off. I understand this behavior is completely to be expected, but how can I stop this from happening? I foresee something with stopObserving, but I'm not sure how and where to start, so if anyone could give me some hints in the rigth direction, that'd be greatly appreciated. Here's a pastie, just in case: http://pastie.org/478919 Thanks in advance, Maarten --~--~-~--~~~---~--~~ 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 exception handling
Hi, Please explain why it should not propagate exceptions normally... I don't see any point in continuing this. You feel quite strongly about this and I'm unlikely to change your mind. I feel less strongly about it, but you're not likely to change my mind either -- not that it matters either way, as neither of us is a Core developer. :-) I _do_ see your point about the absense of an onException handler being somewhat analagous to the absense of a catch block. Happy coding, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On May 15, 1:38 am, Glenn Maynard gl...@zewt.org wrote: On Thu, May 14, 2009 at 8:17 PM, T.J. Crowder t...@crowdersoftware.com wrote: Sure, after figuring out why exceptions are disappearing, and then figuring out how to get around that all-encompassing exception block surrounding the responder. It's a lot of digging to get reasonable default behavior. Or, you know, read the documentation. ;-) The documentation explains how to set exception handlers within AJAX. It does not explain that if you don't set one, exceptions will be silently ignored; to figure out why my callbacks were silently doing nothing I had to trace the source. Nor does it explain how to force exceptions to be propagated normally; delaying the exception in a defer() is hardly obvious. No, seriously, we'll have to agree to disagree on this. I'm just one counterpoint to your statement that most people would expect something else. I wouldn't. I expected, and quickly found when I started using Prototype's Ajax stuff, exactly what's there. I find the default behavior quite reasonable. You find the default behavior of silently ignoring all exceptions reasonable? Seriously? Please explain why it should not propagate exceptions normally when no error handlers are set. You havn't given any rational explanation. If you're using exception callbacks, then this has zero impact on you. -- Glenn Maynard --~--~-~--~~~---~--~~ 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] Changing href in onclick function
I have a id=ph href=#. I want to do that (sorry for my poor english): When user click ph, i need to set href to some usable address (by sending request Ajax.Request) and fire onclick once again. I've done like below, but not works good :/ Please help... how to do this better ? $('ph').observe('click', function() { Event.stop(event); $('ph').fire('owner:click'); }); $('ph').observe('owner:click', function() { if($('ph').href.endsWith('#')) { new Ajax.Request(geturl.php, { onComplete: function(request) { $('ph').href = request.responseText; $('ph').fire('owner:click'); }.bind(this) }); } else { // open link... } }); --~--~-~--~~~---~--~~ 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: Prevent element from flickering on hovering
Hi Maarten, 1.6.1 provides emulation of IE's mouseenter and mouseleave events for all browsers, so if you can use 1.6.1, you can use that new stuff. If you can't use 1.6.1 yet, you can look into the source of it to see how they're doing it. (It's pretty straightforward.) 1.6.1 info: http://prototypejs.org/2009/3/27/prototype-1-6-1-rc2-ie8-compatibility-element-storage-and-bug-fixes HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On May 15, 8:57 am, Maarten maartenwie...@gmail.com wrote: Hello, Athttp://remcobohle.mwierda.blackpearl.minus3.nl/flickering.htmlI'm trying to accomplish the following. I have a list of images positioned next to each other using a table. Each image has a caption, using a DIV element, that I want to display only when the user hovers over the image. Everything works as expected really, but when the user hovers the image AND the caption (e.g. by moving the cursor over the bottom of the image) a rather distracting flickering effect appears, that I would like to get rid off. I understand this behavior is completely to be expected, but how can I stop this from happening? I foresee something with stopObserving, but I'm not sure how and where to start, so if anyone could give me some hints in the rigth direction, that'd be greatly appreciated. Here's a pastie, just in case:http://pastie.org/478919 Thanks in advance, Maarten --~--~-~--~~~---~--~~ 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] Custom JS breaking in IE6,7 - Tips on debugging?
Hi all, I just got around to testing my Rails application in IE6 and 7 and I discovered that my custom Javascripts (written in Prototype) dont work and seem to break the HTML and CSS in the page too. Any tips or resources that I can read up to make my JS IE compatible? Your experiences and thoughts? I coudl post some of my code here if anyone could help me with it. Hope to get some pointers.. 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] Re: Adding a input box
On May 14, 3:54 pm, mahen chiku.4...@gmail.com wrote: Hi all thanks for replying.. no this is the correct value i am giving this by my own. well ya i tried the above solutions by direct inserting the input tag as Html but still its not working in Mozilla. Well my designer is saying there might be somewhat issue of Design Css as the positioning of that container div he is working on it might it workss.. You still haven't told us what you mean by 'not working'. Colin --~--~-~--~~~---~--~~ 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: InPlaceEditor does not show up in place?
On May 14, 9:13 pm, Rob r_rec...@hotmail.com wrote: I'm new to script.aculo.us and trying to use the InPlaceEditor to edit a string on the same line as some HTML. When I click on the text controled by the Ajax.InPlaceEditor() call it always displays the input control on the next line. Is this a not so inplace editor? Am I missing something? Searches on the web didn't come up with any bugs in this, but it doesn't seem to be working as expected. simple repro: I don't fully understand what you're saying (I've not yet used inPlaceEditor) but in general terms, on the same line is meaningless when you are talking about HTML. HTML is formatted according to your markup, and the CSS in force (including the browser's own). Except in special circumstances like a pre tag, the formatting of the HTML source is ignored. I'm guessing that what happens here is that the control generated by the inPlaceEditor object is bigger than the original text, so your browser (or anybody else's browser) is free to reformat it as it sees fit. If you want this not to happen, you'll need to apply suitable css to constrain it. Colin --~--~-~--~~~---~--~~ 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: Prevent element from flickering on hovering
On 15 mei, 11:20, T.J. Crowder t...@crowdersoftware.com wrote: 1.6.1 provides emulation of IE's mouseenter and mouseleave events for all browsers, so if you can use 1.6.1, you can use that new stuff. If you can't use 1.6.1 yet, you can look into the source of it to see how they're doing it. (It's pretty straightforward.) 1.6.1 info:http://prototypejs.org/2009/3/27/prototype-1-6-1-rc2-ie8-compatibilit... Hi T.J., Thanks for your fast repsonse. I was not aware of mouseenter and mouseleave being implemented in version 1.6.1, but I implemented it and it works great! Oh, the subtle differences between 'enter' and 'over', 'leave' and 'out'! Regards, Maarten --~--~-~--~~~---~--~~ 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: clonePosition
Thank u for reply, But I did not use this word in my code!!! On May 14, 3:13 pm, Marslander yazev...@gmail.com wrote: That is because you call Prototype method 'this.clonePosition' by clicking your button. In this case 'this' - is the button itself (extended element). You need to rename your 'clonePosition' function. On May 13, 2:54 pm, Alaa ala...@gmail.com wrote: Hello, From it is name I expect that the two elements will have the same position after cloning the position, but nothing happens!!! here is the example html head titlePrototype examples/title script type=text/javascript src=/javascript/prototype.js /script script function clonePosition(){ var firstElement = $('firstDiv'); var secondElement = $('secondDiv'); secondElement.clonePosition( firstElement); } /script /head body pClick Clone Position button to see the result./p div id=firstDiv pThis is first paragraph/p /div div id=secondDiv pThis is second paragraph/p /div br / input type=button value=Clone Position onclick=clonePosition();/ /body /html So, is that a bug, or I have some mistakes, or it is not doing as I have understood??? help please --~--~-~--~~~---~--~~ 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] toColorPart
Hi, I am trying to use toColorPart function, but (10).toColorPart() it works s=10; (s).toColorPart()// Doesnot work !!! Help please --~--~-~--~~~---~--~~ 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: Custom JS breaking in IE6,7 - Tips on debugging?
This is the smallest piece of custom JS thats NOT working. Is the method of DOM reference im using wrong? Im using the this.up and this.down methods all over my custom JS. Ruby/Rails code h4Filter Tickets/h4 pFilter tickets by status./p form id='filter' class='filter' action=/tickets method=get p %= hidden_field_tag :commit, Filter% %= select_tag status, options_from_collection_for_select (Status.find(:all), :id, :status,selected_status(params [:status])), :onchange = this.up('.filter').submit() % /p /form Resulting HTML page source h4Filter Tickets/h4 pFilter tickets by status./p form id='filter' class='filter' action=/tickets method=get p input id=commit name=commit type=hidden value=Filter / select id=status name=status onchange=this.up('.filter').submit ()option value=1Open/option option value=2Accepted/option option value=3In Progress/option option value=4Completed/option option value=5 selected=selectedAll/option option value=6Invalid/option/select /p /form /p HELP! On May 15, 3:42 pm, Ram yourstruly.vi...@gmail.com wrote: Hi all, I just got around to testing my Rails application in IE6 and 7 and I discovered that my custom Javascripts (written in Prototype) dont work and seem to break the HTML and CSS in the page too. Any tips or resources that I can read up to make my JS IE compatible? Your experiences and thoughts? I coudl post some of my code here if anyone could help me with it. Hope to get some pointers.. 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] Re: toColorPart
try: var s = 10; s.toColorPart(); On May 15, 1:39 pm, Alaa ala...@gmail.com wrote: Hi, I am trying to use toColorPart function, but (10).toColorPart() it works s=10; (s).toColorPart()// Doesnot work !!! Help please --~--~-~--~~~---~--~~ 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: Queing effects
Take a look here too: http://proto-scripty.wikidot.com/scripty:how-to-timing-and-sequencing-animations On May 13, 1:27 pm, Jeztah webmas...@thecarmarketplace.com wrote: Evening guys, Does anyone know if i can queue effects in scriptaculous... Basically what i want to do is... On document loaded a div moves from one position to another (Effect.Move) then when its finished fire another Effect (Effect.Grow) after it... in the past i would do this with setTimeout and wait for it to fire then fire the next effect but it seems stupid to do if scriptaculous allows this... I was looking at effect.queue on the github page but i am not sure if its what i am after or not.. can anyone clarify or point me in the direction of what i need to do. Thanks in advance Alex --~--~-~--~~~---~--~~ 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 exception handling
On Fri, May 15, 2009 at 4:47 AM, T.J. Crowder t...@crowdersoftware.com wrote: I don't see any point in continuing this. You feel quite strongly about this and I'm unlikely to change your mind. I feel less strongly about it, but you're not likely to change my mind either -- not that it matters either way, as neither of us is a Core developer. :-) I _do_ see your point about the absense of an onException handler being somewhat analagous to the absense of a catch block. If you're not going to explain your opinion at all, then no, there's no point in continuing this with you. You havn't offered a single reason for why the errors should not be raised if no exception handlers are set. Don't just assert your disagreement and then refuse to explain it. -- Glenn Maynard --~--~-~--~~~---~--~~ 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: Custom JS breaking in IE6,7 - Tips on debugging?
Thanks a lot for both your replies! Tobie, your suggestion dint work. Thanks though. Vladimir's did. I have one page thats simply loaded with custom JS. There a lot of text fields in it which have a JS hook simliar to onchange=autofill_record(this) . And these custom JS functions use a lot of (element).up and (element).down to manipulate user entered values and perform some calculations and display the results. Could you tell me what the right syntax is that I should be using for IE to be able to interpret my code? Thanks again! On May 16, 12:38 am, Vladimir Tkach tea...@gmail.com wrote: Another one: $$('.filter').first().submit() -- Best Regards, Vladimir Tkach +972-54-7574166 tea...@gmail.com http://teamco-anthill.blogspot.com/ --~--~-~--~~~---~--~~ 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: Custom JS breaking in IE6,7 - Tips on debugging?
A sample of the kind of calculation code im using function calculate_average( element ) { s = element.down('.science').value || 0; m = element.down('.math').value || 0; a = (parseFloat(s) + parseFloat(m)) / 2; return parseFloat(a); } function calculate_all() { total = 0; $$('.student').each( function(element) { avg = calculate_average( element ); element.down('.average').value = avg; total += avg; }) console.log( ttl: + total + size: + $$('.student').size() ); $('total_average').value = total / $$('.student').size(); } Hope its only a matter of using the right syntax to identify the DOM elements im using. On May 16, 12:38 am, Vladimir Tkach tea...@gmail.com wrote: Another one: $$('.filter').first().submit() -- Best Regards, Vladimir Tkach +972-54-7574166 tea...@gmail.com http://teamco-anthill.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---