scriptaculous

Fixing a project with multiple Javascript frameworks

I just started a new job, and my first task is to clean up the Javascript code for the site - the problem is that there are two JS libraries being used (jQuery and Prototype / Scriptaculous). I'm trying to figure out what's being used where, but it's pretty difficult, especially not being very familiar with the code. Does anyone have a...

How can I run an appear effect and a fade effect in scriptaculous? I need them to run in tandam so that no other effect can slot inbetween...

Hi, Ive been fiddling with this for hours and hours and just cant get it right. First off my sites are already using Prototytpe and Scriptaculous, and to change would take a long time. Basically I am after achieving a slideshow effect similar to jQuery Cycle plugin. I have written most of it but cant get over this hurdle: I need the u...

How to run a scriptaculous effect on all of the checked items in a form?

I've created a long form of multiple items that each have a checkbox next to them. What I want to do is allow users to check all the lines that they don't want, and then have scriptaculous use the Effects.Dropout function to get rid of all of them. Is there an easy way to loop through all of the selected items and drop them? ...

Fixed Bar like facebook/wibiya with jquery/YUI/prototype

Hello All, I was just wondering if any one knows of a good script to emulate a bar like wibiya or the facebook notification bar that used to appear at the bottom(just before the current facebook homepage change) . I just checked out one of the scripts but it is still under heavy development so looking for some stabler options: http://...

Scriptaculous Slider handle doesn't move when slider is above a multimap.

I have a Scriptaculous Slider showing in a modal-dialog window above a Multimap. The problem that I'm having is that on this page the slider handle doesn't move if you try to drag it. If I click on the slider track, the handle correctly jumps to that point and you can then use the handle to drag correctly. Clicking on the handle success...

Lightbox not Working

I downloaded & followed the instruction on how to set up the Lightbox effect from here but it is not working view please help me. in the Head section: <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src=...

Generating scriptaculous ajax.autocompleter on the fly

I have a form where the user can dynamically add a new table row with fields. I'm using a simple insertCell/InsertRow with innerHTML to generate the new row. One of those form fields is using scriptaculous' ajax.autocompleter. I have it generating new IDs for all the elements, but it is still not working The new row generated by js h...

Using prototype/scriptaculous to hide the previous row

I dont know if this is even possible, but I have a situation where I need to be able to hide the previous table row onload. Situation: <table> <tr> <td>1</td> <td>a</td> </tr> <tr> <td>2</td> <td>b</td> </tr> <tr id="removeabove"> <td>3</td> <td>c</td> </tr> </table> Now again I dont know if this is even p...

How do I morph a class with Scripty 2?

In Scriptaculous 1, you could animate styles: new Effect.Morph('id', { style: { background: tomato }, duration: '4' }); But a better way was to keep the CSS and JS separate and merely reference a class: new Effect.Morph('id', { style: 'important', duration: '4' }); Marvellous. But this doesn't seem to work with the new Scripty 2. W...

Javascript - Scriptaculous - Effect Callback function

I am using scriptaculous to perform a slidedown effect using the following code: Effect.SlideDown('dom_element_id'); I then hide the button which initiates this effect using: $('button_id').hide(); The issue is that the button is hidden before the animation effect is complete, I would like it to hide after the animation effect is com...

scriptaculous-like component to avoid double-submit

Hi, I'm looking for a script to prevent the user from hitting the submit button twice specially for long time background processing forms. I'd like to implement something not just functional but visually appealing too. Can anybody share some tips of how to accomplish this using, for instance, scriptaculous ? Thanks ...

hidding a draggable after dropping it (scriptaculous)

probably best if i first just write my code down. i have: <li class="sorted" id='<%= domid %>'> <%= horse.name %> </li> <%= draggable_element(domid, :ghosting=>true) %> after the drop on some "box" the draggable element with name = horse.name stays on it. i want to delete it(the name). i was trying different things. supposedly i ...

Hide/Show <div> according to URL in Prototype

Hi Guys, I am trying to use the prototype framework to hide a '< div >' based on a particular URL. I don't have access to server side - so I have no choice but to do this using prototype [restriction of platform using prototype]. Wondering if someone could tell me how to do this in prototype framework ? i.e. I tried to do this but doe...

CurvyCorners Error

Hi Guys, I am using this code with http://www.curvycorners.net/instructions/. Everytime I use it I seem to be getting var curvyCornersVerbose = false; Event.observe(window, 'load', function() { var settings = { tl: { radius: 5 }, tr: { radius: 5 }, bl: { radius: 5 }, br: { radius: 5 }, antiAlias: tru...

Rails, Scriptaculous, effect where one element pushes another out of the way

I really like the visual effect where a new element seems to push an old element out of the way. Pretty common thing recently. here is a static example. http://github.com/ However, I'm trying to do it with recently updated products. Also would like to use scriptaculous if at all possible with periodically_call_remote using ruby on rai...

Scaling elements Upward with Scriptaculous

I'm building a little menu item using Prototype/Scriptaculous. The little test I have setup uses Effect.Scale on a menu item. I'd like the item to scale upward and push the other element up with with it when you hover over the menu item. I have the ul.nav set to a specific height, but the scaled element seems to be positioned absolutel...

Scriptaculous Draggable/Droppable script not working properly when dragging into a scrolling div

I am using the Scriptaculous Draggable/Droppable scripts and have a problem when dragging into a scrolling div. I have the following layout (based on this question): #grid-container { left:33px; position:relative; width:300px; } #grid { width:310px; height:400px; overflow:auto; margin-bottom: 15px; } #grid-container ul { width:40...

Need help with cycle in JS

I have such function, that adds a grid of droppables: function AddClassroomDrops(grid, weeks, days, times) { for(week = 1; week <= weeks; week++) { for (day = 1; day <= days; day++) { for (time = 1; time <= times; time++ ) { Droppables.add('container_grid'+ grid + '_week' + week + '_day' + day + '...

HTTP DOM: request.use? Usage?

I'm looking at the following code block in javascript: var request = new Request(); if(request.Use()) // What exactly does this do? { // ...do stuff } else { // no ajax support? } I've never seen anyone invoke the request.Use() method. My Question: What exactly does request.Use() check? Does it in fact check for...

Scriptaculous Drag: How do I offset the dragging element?

This is an age old problem - but now I'm using scriptaculous its come back to haunt me. When dragging a tree node over other tree nodes I want mouseover to fire for each node I drag over. So I want to position the dragging thing so that its top-left is slightly below and to the right of the mousepointer can anyone help? - thanks ...