scriptaculous

How to set different width for INPUT and DIV elements with Scriptaculous Ajax.Autocompleter?

青春壹個敷衍的年華 提交于 2020-01-24 22:00:08
问题 I am working on autocompleter box based on Scriptaculous Ajax.Autocompleter. It works in general, but I need to have list of choices wider (see image -- green line -- 320px) then input box (see image -- red line -- 155px). My first try was to set various width with CSS classes (like above), but it didn't work -- list of choices became as wide as input box. According to Firebug width defined by my CSS class was overwritten by width set by element.style CSS class, which seems to be defined by

Conflict Bootstrap, Prototype Js and Jquery

蓝咒 提交于 2020-01-21 12:14:46
问题 After 7 days of search and after i have tried different solutions and it did not work i would like to ask: I have a page with prototype js, protaplasm, and scriptaculous and jquery and Jquery-ui and it was working perfectly with the jquery no conflict until i recently downloaded a design with Bootstrap and here comes the trouble. Prototype js fonctionalities are no more working. The ajax update of prototype js and the inplaceeditor the scriptaculous are no more working. I have tried most work

smooth scroll not working in firefox, works fine in IE

假如想象 提交于 2020-01-17 01:10:28
问题 My beloved Firefox is losing to IE on this. Anyone know why this won't function in Firefox? (doesn't even go to anchor), but scrolls smoothly in IE? document.observe("dom:loaded", function() { if ($$('a.scroll')) { $$('a.scroll').invoke('observe','click', function(event) { Event.stop(event); var elementLink = Event.element(event).readAttribute('href'); var scrollHere = elementLink.substr(1, elementLink.length); Effect.ScrollTo(scrollHere); return false; }); } }); applied as such: <a class=

Problems with mouseout event

♀尐吖头ヾ 提交于 2020-01-12 05:40:09
问题 I'm using JavaScript to hide an image and show some text thats hidden under it. But, when the text is shown if you scroll over it, it fires the mouseout event on the container, that then hides the text and shows the image again, and it just goes into a weird loop. The html looks like this: <div onmouseover="jsHoverIn('1')" onmouseout="jsHoverOut('1')"> <div id="image1" /> <div id="text1" style="display: none;"> <p>some content</p> <p>some more content</p> </div> </div> And the javascript (It

Mouseover event triggered by Child Elements - how to stop this?

梦想的初衷 提交于 2019-12-24 00:45:31
问题 I have this interface I want to build using Effect.Move from scriptaculous (with Prototype, of course). When the top div is triggered on a mouseover, a span tag is to move 50 pixels to the left - and reset without movement to the original location on mouseout. The problem is, any time this div element is entered from a child element, the element I want moved moves an additional 50 pixels. I've tried using relatedTarget and toElement to stop this event from propogating, but to no avail. Here

JavaScript Array Iteration returning more than values

我怕爱的太早我们不能终老 提交于 2019-12-22 13:56:29
问题 This is so simple I am baffled. I have the following: var x = 'shrimp'; var stypes = new Array('shrimp', 'crabs', 'oysters', 'fin_fish', 'crawfish', 'alligator'); for (t in stypes) { if (stypes[t] != x) { alert(stypes[t]); } } Once the values have iterated it starts returning a dozen functions like function (iterator, context) { var index = 0; iterator = iterator.bind(context); try { this._each(function (value) {iterator(value, index++);}); } catch (e) { if (e != $break) { throw e; } } return

Scriptaculous / Prototype modal window

不想你离开。 提交于 2019-12-21 06:23:34
问题 I would like to make a modal window using prototype and scriptaculous. I was wondering if there is any site that has a tutorial or if anyone could kinda give me some idea where to start. (I don't want a prebuilt one) 回答1: In addition to Control.Window, here are some others I have found: http://okonet.ru/projects/modalbox/index.html (very nice, and free) http://prototype-window.xilinus.com/download.html (looks pretty good) http://dzone.com/snippets/javascript-dialog-box-based (not packaged,

Crossbrowser equivalent of explicitOriginalTarget event parameter

旧城冷巷雨未停 提交于 2019-12-17 09:59:26
问题 Does anyone know of crossbrowser equivalent of explicitOriginalTarget event parameter? This parameter is Mozilla specific and it gives me the element that caused the blur. Let's say i have a text input and a link on my page. Text input has the focus. If I click on the link, text input's blur event gives me the link element in Firefox via explicitOriginalTarget parameter. I am extending Autocompleter.Base's onBlur method to not hide the search results when search field loses focus to given

making a rotating or swing effect with scriptaculous shake?

风流意气都作罢 提交于 2019-12-13 06:29:13
问题 I am trying to have an effect when moused over, the item does not shake from side to side, but slides sort of like a clock pendulum rotating from 180-90 degreeds (or whatever, I can't remember the exact numbers right now). Is this possible with scriptaculous or another js library? 回答1: I found a library for JQuery that does what I want perfectly: http://www.zachstronaut.com/posts/2009/08/07/jquery-animate-css-rotate-scale.html 来源: https://stackoverflow.com/questions/2035995/making-a-rotating

How do I make an Ajax.Autocompleter perform a request without typing?

谁都会走 提交于 2019-12-12 16:04:32
问题 I'm using scriptaculous's Ajax.Autocompleter for a search with different filters. http://github.com/madrobby/scriptaculous/wikis/ajax-autocompleter The filters are requiring me to pass data into the autocompleter dynamically, which I've successfully learned to do from the following link. http://www.simpltry.com/2007/01/30/ajaxautocompleter-dynamic-parameters/ Now, I have multiple filters and one search box. How do I get the autocompleter to make the request without typing into the input, but