[Proto-Scripty] Re: wierd setStyle Backgroundimage happenings..
This is probably because when You set url for image from stylesheet which probably You've got in some css/ directory You set it like '../ images'. But when You set in in inline styles this files are in ./ images path. On 5 Sty, 11:23, Matt matthew.jones...@gmail.com wrote: I have read the other post in this group where they were having issues with the setStyle background image code, but I am still having trouble getting this to work. It appears to be executing the setStyle background code but instead of changing to the specified image, it changes to no background image and stays that way. I have a mouse over listener and mouseleave listener, when the mouseenter is triggered, the bg changes to nothing, and when the mouseleave is triggered, the bg stays as nothing. I have included the div CSS so you can see the that i am using the correct file paths. A div callled 'zoom' has a mouseleave and mouseenter listener, which trigger the background of 'featured' to change accordingly, basically making it so the rollover effect of 'zoom' is extended to 'featured'. I have tried several different variations of the JS to make this work, but with no success. CSS of div to change bg-image of. #featured { height: 304px; width: 719px; margin-bottom: 6px; margin-top: 4px; background-image: url(../images/site/border_main.png); background-repeat: no-repeat;} #featured:hover { background-image: url(../images/site/border_main_ro.png); background-repeat: no-repeat; cursor:pointer; } JS of listeneres Event.observe($(zoom), 'mouseover', function() { $(featured).setStyle({background : 'url(../images/site/ border_main_ro.png)'}); }); Event.observe($(zoom), 'mouseleave', function() { $(featured).setStyle({background : 'url(../images/site/ border_main.png)'}); }); do you see why this setstyle is not working? or perhaps know a better way of extending rollover functionality between seperate divs? Thanks, 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-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] Re: Encoding parameters in Ajax Request
I can't undarstand one thing. How You encode Your original value to Sr +16%2b? Because when I use encodeURIComponent I get %20Sr%2016%2B which properly decodes to original value. EDIT: I read this topic second time and realised that the point is that it is prototype which encodes Your string and for unknown reason does it wrong. Sorry if I wrote something obvious ;) On 4 Sty, 06:35, kstubs kst...@gmail.com wrote: Follow up: walking through the code, where my value is decoded to: Sr+16+, if I update (fix) the value back to Sr+16%2b and then send the request through, when I look at the Post values in the Console the value becomes: Sr 16+. I'm not sure when the value becomes this, and this doesn't work, it has to be Sr+16%2b. Any ideas? Karl.. -- 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] Re: How to observe pure xmlHttpRequest response
I don't know answer for the first question. But for the second is event capturing - http://www.quirksmode.org/js/events_order.html There are two ways of propagating events - from the outer elements and from inner. The first way is named event capturing. Unfortunately I can't find in api.prototypejs.org info about setting event capturing type (probably due to IEs problems). But of course You can use basic JS addEventListener or maybe there is some hidden way (http://groups.google.com/group/prototype-scriptaculous/browse_thread/ thread/78568b4a509767c7). On 29 Gru 2010, 02:43, kstubs kst...@gmail.com wrote: I'd like to observe pure XmlHttpRequest, in other words, an Ajax request made by code not written for prototype.js. Is this possible? Ultimately, I am working with an existing .NET web application and I'd like to add additional features to the resulting client side script without busting open the source. Another thought: I am trying to observe document.observe('click', myClickHandler ()); but never reaching myClickHandler as I believe the underlying code is stopping the propagation of this event. If this is the case, is there no way to observe a click at the document level? Karl.. -- 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.