scriptaculous

Making a drop-down list using scriptaculous and prototype's BlindDown or SlideDown effect

I'm trying to make a javascript dropdown list using scriptaculous and prototype. I know this can be done using CSS :hover pseudo-selectors, but I would like to add some additional flair to it. The problem is that while I can kind of get the dropdown/up effect working, it seems very flaky. Is there a simple way to do this, or should I sti...

get scriptaculous helper drop_receiving_element to not generate "<script>" tags

Is there a way to get drop_receiving_element to not generate "// .. ...

Script.aculo.us Sortable onUpdate problem in IE.

I'm working on a project where I am using a script.aculo.us Sortable object. It works nice and fast in Firefox and Chrome, but in IE it is incredibly slow whenever I drop an element. I've done a little checking, and it turns out that in IE, the "onUpdate" callback function gets called about 8 times every time I drop. Normally it is s...

JSF RichFaces and a dual slider

I see in richfaces that there is a single slider, wondering if anyone has created a dual slider like in Scriptaculous for it. Is there any concerns in mixing JSF, Richfaces and Scriptaculous in an application? ...

iFrame causes scriptaculous dragging issues in IE7 (full code included)?

When I drag a link that is inside a draggable div over an iframe in IE7, I get very strange results. Try the code below and let me know if you have any suggestions about how to fix this. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html> <head> <!--<sc...

Scrollable div without overflow:auto ?? (javascript)

In my app I have 2 divs, one with a long list of products that can be dragged into another div (shopping cart). The product div has the overflow but it breaks prototype draggable elements. The prototype hacks are very obtrusive and not compatible with all browsers. So I am taking a different approach, is it possible to have a scrollable...

Using YUI and Prototype Together

I want to add a calendar control to a page that already includes Prototype and Scriptaculous. Not happy with any of the Prototype ones I could find, I'm considring using the YUI Calendar widget. I this likely to cause any problems? ...

Scale div vertically until all content is shown?

I have a div with a set height of 200, and sometimes there's enough content inside to have to scroll. Is there any way to be able to scale/grow the div until there's no overflow in Scriptaculous? Edit: I looked at the wiki, especially at Effect.Scale (which seems like the one I want) but I couldn't find a way to do what I'd like. ...

How to use javascript onclick on a DIV tag to toggle visibility of a section that contains clickable links?

Hi I've got a DIV section that has only its title visible initially. What I would like to achieve is that when the visitor clicks anywhere on the area of toggle_section the toggle_stuff div toggles between visible/hidden. <div id="toggle_section" onclick="javascript: new Effect.toggle('toggle_stuff', 'slide');"> <div id="toggl...

get one Attribute id, set as another Attribute id

I'm currently using scriptaculous and prototype to drag/drop elements from one div to another, and append a new Element based on the 'src' of the element that is dropped, creating a new draggable out of it. What I need to do is assign the id of the dropped element to the new one once it is created. I've tried a ton of different approac...

How To Elegantly Handle JSON Objects in Responses From Ajax Requests?

I'm really new to using JSON to handle my Ajax Request and Response cycle. I've previously used just plain old parameters passed as POST data and I've rendered straight HTML in the response which was then placed into the DOM. As I've looked at various examples and read through various tutorials, it seems like a fairly common practice to ...

scriptaculous draggables: need to cancel onClick action when element is dragged.

Thanks for the three excellent answers which all identified my problem of using "onclick = ..." instead of "observe( "click",..." But the award for Accepted Answer has to go to Paolo Bergantino for the mechanism of adding a class name to mark the dragged element, which saved me some more work! In my HTML I have a table with an image ...

scripty (scriptaculous) draggable onEnd not executing in Safari

hey all, i've created a very iphone-y slider element that is both restricted in overall movement horizontally (0-400px and it does not move vertically) and "snaps" to either side of the 400px "container" when it has passed the 200px mark and the drag has ended. It works perfect in firefox. In Safari, the onEnd function that positions th...

Prototype/Scriptaculous: Selecting groups of paragraphs (<p>) by clicking on them.

A list of paragraphs (<p>) is given. As soon as the user clicks on paragraph A the class of paragraph A changes to "activated". Now the user selects paragraph B and all the paragraphs between A and B change their class to "activated". By clicking on B again, only A remains with the class "active". By clicking on A the class "active" ...

Stopping Effect.ScrollTo() while it's scrolling?

Yeah, basically I have this: Effect.ScrollTo("bottom", { duration: 5.0 }); So what I want is to stop this effect while it's scrolling whenever I want to. Any help? ...

scriptaculous ajax autocomplete empty response

I’m working with the ajax-autocompleter which works great. My aim is to redirect between an editing function for an existing item, or a creating function for a not-found item. I insert a specific id to each li, and I can therefore use it for the editing function with an afterUpdateElement option. But if no results are found, the list i...

Can you combine replace_html with a visual_effect in Rails RJS?

I'm developing a website with Ruby on Rails and I have a div with some content. After clicking a link I want that content to get replaced with some other stuff. This works fine with replace_html and rjs. However, I'd prefer there to be a slight fade/appear (crossfade?) transition between the old and new content. Also the div will be ...

jQuery UI vs. Scriptaculous ?

Which is better for UI development. Are there any differences between the two UI toolkits? ...

Scriptaculous autocompleter problem

In Scriptaculous Ajax autocomplter it chooses the first entry by default . how do i stop it from choosing the first option by default?? ...

Scriptaculous Ajax.InPlaceEditor does not work with HTML

Hello, I'm using the Scriptaculous Ajax.InPlaceEditor to edit data from my database. Actually, it works perfectly at first, when there is no data in the database ; Here is what I have in my navigator source code : <p id="edit" title="Click to edit" > New text to edit here </p> I can create a new record, automaticly add some HTML to ...