Все вопросы: [prototypejs]

335 вопросов

похожие теги:
2
голосов
4ответов
9005 просмотров

Tooltip using Prototype.js

It seems so hard to find a easy to use tooltip for Prototype library. The ones that are out there are so bloated. What I am looking for is something as simple as this. <a class="tooltip">This is my sentence<span>Tooltip is here</span> that ends in sorrow.</a> <a class...

1
голосов
2ответов
1251 просмотров

Jquery + Prototype in noConflict() mode, Array.prototype.indexOf broken

i'm trying out this jquery plugin http://plugins.jquery.com/project/stylish-select-box/ it works good but with prototype + jquery in noConflict mode this function broke others scripts Array.prototype.indexOf = function (obj, start) { for (var i = (start || 0); i < this.length; i++) {...

1
голосов
1ответов
3061 просмотров

PrototypeJS observe windows dimensions change?

I'm trying to create my own 'modal' window since none of these currently existing for PrototypeJS fits my needs. The problem is observing document.documentElement for change of height and width of viewport ( or document.body, depending on Quirks/Standard mode ).

0
голосов
1ответов
1220 просмотров

Prototype Selection Help

Hey guys, I'm trying to make a small addition to a web app I use. Right now I am trying to check all of the checkboxes on the page which have class .checkBox (In case it is needed to differentiate/select). The checkboxes are descendants of divs of class .someClass, it's just that there are many d...

9
голосов
4ответов
9088 просмотров

Wrapping a div around the document body contents

I am trying to dynamically wrap the contents of a document's body tag in a DIV. So far, I have used the following code: document.body.innerHTML = '<div id="wrap">' + document.body.innerHTML + '</div>'; This works, but has the unwanted side effect that other scripts on the same page...

0
голосов
1ответов
5305 просмотров

IE8 whines about Prototype, "'undefined' is null or not an object"

I have an element that is dynamically created with new Element('div') and is then faded in, moved, and faded out. In every browser, my code works as expected – every browser but IE. Internet Explorer complains that 'undefined' is null or not an object exactly as documented on Prototype's Lightho...

2
голосов
5ответов
7876 просмотров

What is the logic of Lightbox 2 on where to position the popup?

What is the logic of Lightbox 2 on where to position the popup? It seems that when using Firefox or Chrome it shows up in different places on different pages. Is there any setting to have it show at the same height on every page for consistency? What is the CSS or logic it's using to determi...

1
голосов
3ответов
572 просмотров

Writing a JavaScript abstraction abstraction - is this sane?

I've written a JavaScript application that runs off Prototype & Scriptaculous. I'm thinking of rolling it out in as an open source product & would like it to be able to run on jQuery as well — I typically use jQuery for most of my other apps, except the site this app was originally built ...

3
голосов
1ответов
785 просмотров

Not all items sortable with Scriptaculous, Sortables, scroll and overflow

I'd like to have a scrollable container with overflow:scroll in which a sortable list is contained, like so: <div id="container" style="overflow: scroll; width: 200px; height: 100px;"> <ul id="fruit"> <li>Apple</li> <li>Banana</li> <li>...

0
голосов
1ответов
1873 просмотров

Prototype Javascript, working in Mozilla but not in IE

I am using JavaScript Library from prototype v.1.6.0.3 I found out that the basic notation $ is working fine in Mozilla, but not in IE6. Here is simple example Element.hide('div123'); --> working at IE & Mozilla $('div123').hide(); --> working only at Mozilla I am wondering what i...

1
голосов
1ответов
1008 просмотров

Dynamic object parameter names in Prototype's ajax.updater

Uaing the Prototype JavaScript library, I have this var panelItemId = 12345; var param1 = 'expandPanel'; var updater = new Ajax.Updater('myTarget','myUrl',{ method: 'get', parameters: { expandPanel: panelItemId } } ...

0
голосов
2ответов
361 просмотров

Prototype and YUI

I saw a reference on a company intranet recently that "You should use YUI instead of prototype". (formerly Prototype was company recommended JS framework). Is that because YUI builds on/extends Prototype? Or merely implements a super-set of its functionality?

1
голосов
1ответов
792 просмотров

Using Ajax.Request response inside of an object ? - PrototypeJS

for past two hours i've been trying to pass responseText to the object i'm calling Ajax.Request in. And it just isn't happening :) Here's the code; var traziSuggest = Class.create({ initialize:function( elemenat, sugDiv ) { this.elemenat = $( elemenat ); this.elemenat.onkeyup...

1
голосов
1ответов
2849 просмотров

Internet Explorer 7 & 8 issue with Prototype 1.6.1 - Could not complete the operation due to error c00ce56e

I'm at a loss. I found a few things that mentioned IE needed to have the response type specified and I changed that to text/html and that did nothing for me. There Error: Could not complete the operation due to error c00ce56e. prototype.js, line 1564 Points to in prototype.js: if((readyState...

0
голосов
1ответов
575 просмотров

prototype serialize returns function instead of serialized string

I have a script. In it is code. I have a page. In it is some stuff from db. There is an edit button. When pressed, a div pops up and is populated with form fields via ajaxrequest -ing an external php file. the form has a name, and that name is nameEdit. On that form is a button that calls a js f...

3
голосов
4ответов
11321 просмотров

Prevent user from writing more than N characters in a textarea using Prototype event observers

I am aware that it's possible to emulate the maxlength property from input elements on a textarea by using this trick: <textarea rows="5" cols="30" onkeydown="return checkLength(this)"></textarea> <script type="text/javascript"> var maxLength = 30; function checkLength(elem) ...

0
голосов
2ответов
79 просмотров

Accessing CGI values with Prototype

Anyone know the quickest way to grab the value of a CGI variable in the current URL using Prototype? So if I get redirected to a page with the following URL: http://mysite.com/content?x=foobar I am interested in retrieving the value of "x" (should be "foobar") in a function called on page loa...

1
голосов
1ответов
919 просмотров

Is there any Prototype Javascript function similar to Jquery Live to trace dynamic dom elements?

Event.observe(window,"load",function() { $$(".elem_classs").findAll(function(node){ return node.getAttribute('title'); }).each(function(node){ new Tooltip(node,node.title); node.removeAttribute("title"); }); }); Using above method, I can retrieve all...

0
голосов
1ответов
96 просмотров

Replacing a Classed Element's Content (without an ID)

So I've managed to get stuck using Prototype for a Project, and so far I can't stand it. All I want to do, is replace a title within a very specific place - it has no ID and I can't change the HTML, since it's not hosted by me. Event.observe(window, 'load', function() { $$('#page #containe...

0
голосов
1ответов
1174 просмотров

How to fetch File Field's file name into textbox using Rails and Prototype

I need to know how to fetch file field's file name into textbox using Rails and Prototype I need to upload any file using <%=file_field "text"%> Then I need to fetch those file name into new textbox below

1
голосов
4ответов
5185 просмотров

Rails Modal Form Validation

I am using Lightbox Gone Wild to display a modal dialog with a form inside. I am using a vanilla New view. This works like a champ up until a user doesn't input valid form data. Invalid data causes the controller to direct the user to the New view directly with the error message. Obviously, I wou...

1
голосов
4ответов
3247 просмотров

jquery autogrow

I know that combining two framework prototype and jquery is not a good idea. But I already a lot of code made by prototype, But when I discovered jquery I decided to use this because there is some methods and functions advances than prototype. My question is I was using jquery autogrow but it wa...

6
голосов
10ответов
4410 просмотров

What's the downside of using too much JavaScript?

I would like to know what are some downsides using too much JavaScript code in a web page? For example, I will use a jQuery framework for my dropdown menus, tabs and accordion. And other JavaScripts for my calendar (even-though there is available calendar that uses jQuery) and other JavaScript f...

2
голосов
2ответов
1036 просмотров

Migrating from prototype to jquery

I am migrating my js lib from prototype to jquery. However, I don't know how to replace the following code: var utilityMethods = { autoHide : function(element) { //... } Element.addMethods('SPAN', utilityMethods); Is there a jQuery equivalent for extending the DOM?...

1
голосов
3ответов
1903 просмотров

ajax js serialize not reading form elements

Have a form that is not being read by serialize() function. <script type="text/javascript"> function submitTrans1(){ var formData = $('form1').serialize(); var options = { method:'post', postBody:'formData', onCreate: function(){alert(formData)}, onSuccess: function...

2
голосов
5ответов
3772 просмотров

parse xml in an iframe

I want to be able access an rss feed from js. I have the ability to configure both servers to use the same domain (but different subdomains - eg static.benanderson.us and tech.benanderson.us). I was hoping I could use the document.domain property to get around the xss issue. Here's a snippet ...

2
голосов
3ответов
654 просмотров

$ajax->link() doesn't work in Firefox?

I am reading Beginning CakePHP, and to make it so that you can vote on comments, it tells you to create a couple of AJAX links: <?=$ajax->link('<li>up</li>', '/comments/vote/up/'.$comment['Comment']['id'], array('update' => 'vote_'...

1
голосов
3ответов
231 просмотров

How is JavaScript evaluated at the target page in an AJAX situation?

This may be a philosophical question. Suppose you're making an AJAX request to a page (this is using Prototype): new Ajax.Request('target.asp', { method:"post", parameters:{alldata:Object.toJSON(myinfo)}, onSuccess: function(transport){ var response = transport.responseText || "no respons...

0
голосов
1ответов
506 просмотров

Reading custom POST body within ASP

I'm using Prototype 1.6.1 to create a POST to a page. The POST data is a complex JSON object. Can someone tell me how on the receiving page I can access the raw body of the POSTed data? Sending page: myObject = { "key": "val", "has many": { "key1": "val1", "key2": "val2" } } ne...

1
голосов
1ответов
1629 просмотров

POSTing a complex JSON object using Prototype

I'm using Prototype 1.6.1 to create an application under IIS, using ASP and Python. The python is generating a complex JSON object. I want to pass this object to another page via an AJAX request, but the Prototype documentation is a little too cunning for me. Can someone show me an example of ...