I'm using Prototype to monitor checkboxes, so I can add javascript checks to them. When the tr or td in which the checkbox is located is clicked, the checkbox should be checked.
When you click directly on a checkbox, the onchange event is fired, so you'll get an alert. When the checkbox' value is changed by javascript (when you click on ...
Hi,
In the slide show code below, there's a function to press "previous" and "next" links. The "next" one works fine, and if you keep pressing it, it cycles through all the slides.
The "previous" one is a bit messed up, for some reason - it will go back a slide or two but then it will just go blank!
Could you please help?
Thank you!
...
I'm trying to create a CMS system based on AJAX using Prototype's library. On a page load, I have HTML, page title and additional Javascript for the page returned via JSON, and I update the HTML on the main area. I also have an event listener that listens for certain ID's to be clicked on.
The listener is working,
var TabMenu = {
sel...
I have a site that I am using prototype and scriptaculous on. One one page of my site, I would like to use Digitarald's FancyUploader (I have not found anything else that is as elegant, and offers multiple file selection). Is it possible to use the two on the same page? If so, how would I do it?
Thank you,
Josh
...
I'm running a Rails app and using prototype. The script breaks in IE, but works in all other browsers. I appreciate any help in guiding toward a fix for this.
Here's the problem:
My users sell products and varieties of products. The varieties available are dependent on the product. For example, if we're talking about fruit, the user ...
In the book "JavaScript the definitive guide 5 edition", section 9.2 Prototypes and Inheritance, I find the following words:
In the previous section, I showed that
the new operator creates a new, empty
object and then invokes a constructor
function as a method of that object.
This is not the complete story,
however. After c...
I'm attempting to add a method to prototype's Element object called locateAncestor(), which will find and return the DOM node based on tagName. My code is as follows:
Element.addMethods({
locateAncestor: function(element,tag) {
element.ancestors().each(function(e) {
if (tag == e.tagName) {
alert(e.id);
...
Here's what I want to achieve, I have a select box that loads in a few rows, when the select is changed (onchange) the key is AJAXed to a PHP function that returns an array in the JSON format, my code then clears the select box options and applies the values I have just returned from my PHP function, great.
The problem is when the new v...
I'm having some trouble with prototype changing the value of a hidden field.
Function:
function remove_fields (link) {
$(link).next('input[type=hidden]').value = '';
$(link).up(".open_hours").hide();
}
If I comment out the $(link).next('input[type=hidden]').value = ''; the hide function works. Trying to set the value gives me...
Houston we have a problem:
I have a table with drop_receiving divs inside cells. And i have set of draggable widgets - divs also. I need to call methods of my controller onDrop with sending drop_receiving div id and widget id to it.
P.S. I think in future only ids of divs are not enough, but now i want to understand how to make Ajax req...
To resolve a conflict between jQuery and prototype
is there any way other than asking jQuery to resolve via
jQuery.noConflict
and using jQuery instead of $('code').code;
Cant we ask prototype $ to step down and resolve.
...
I am working with Magento which uses the prototype javascript library. Unfortunately some of the client's data (being fed from point of sale system in to Magento) has & in the html instead of &.
Can anyone help with a method to change all instances of & in the html to & for validation purposes?
...
Is it possible to employ some kind of prototypal inheritance in PHP like it is implemented in JavaScript?
This question came to my mind just out of curiosity, not that I have to implement such thing and go against classical inheritance. It just feels like a interesting area to explore.
Are there prebuild functions to combine classical ...
I'm currently using the facebox_render plugin for rails, and am trying to get it working without jquery (so using prototype). I've got it 99% functional, but there's one line I'm having difficulty with.
how would I write the following using prototype?
link_to_function(name, "jQuery.facebox(function(){ #{remote_function(options)} })", h...
I'm attempting to return a list of observers associated with a particular object using prototype.js 1.6.1. I've googled my eyes out all day and am getting frustrated. I've discovered two methods that used to work with older versions, but do not work with the latest version of the library. These include:
Event.oberservers (Worked wit...
Hi,
I have the following code:
$('message').show();
$('message').hide();
How do I add a 10 second delay between the show and hide in prototype?
Thanks
...
There is prototype js function:
Event.observe(element, eventName, handler)
here the element means element's ID.
Is it possible to put here element's class?
I got this element from third party with class attribute only.
...
Hello we have an investor that is willing to invest in an extensive prototype.
The problem is that he said that he is willing to invest only what sounds like a 'reasonalbe budget'.
This is a high tech startup and we've reached a 300,000$ budget for half a year of development including employees and taxes and equipment rental and an accou...
I cannot find how can I attach an timeout option to the Ajax prototype call or what is the default value for it.
...
we have a lot of existing code in a web application that we want to use in a facebook application. Much of it on the client side depends on prototype.js.
Can I incorporate prototype.js into my FB application without difficulty, and am I going to have to make a choice about iFrame vs FBML early on?
...