[Proto-Scripty] Re: Event Keyup a-z key response

2011-08-02 Thread Victor
Check e.keyCode. For numbers it should be in range 48...57, for letters a...z in range 97...122 (for Shift-a..z also 97...122, so you need extra check for Shift key). Other way is to use onkeypress event - it will have proper codes for a...z and A...Z, but is more browser-specific even with

[Proto-Scripty] Re: Starnge order of observing of events dom:loaded in IE8

2011-08-02 Thread Victor
The order of observers is not guaranteed. IRL, IE6-8 use LIFO, other browsers use FIFO order to call observers. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: Dev i need your help !

2011-08-05 Thread Victor
Prettyphoto is based on jQuery, so you need to read about jQuery.noConflict(). But there in internet is a couple of another lightboxes based on Prototype (you can search at http://scripteka.com/), maybe they will fit your needs. -- You received this message because you are subscribed to the

Re: [Proto-Scripty] Re: Prototype's evolution

2011-08-05 Thread Victor
At least the possibility to fix documentation typos and wrong code samples will be the great leap forward. Many of the tickets at https://prototype.lighthouseapp.com/projects/42103-prototype-documentation/tickets are more than 6 months old. -- You received this message because you are

[Proto-Scripty] Re: Trouble updating position:fixed elements

2011-08-05 Thread Victor
Maybe window.scrollBy(0, 0); can help? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/rmxmr8wZ_asJ. To post to this group, send

[Proto-Scripty] Re: how to implement move/shift left/right effect

2011-08-11 Thread Victor
Do you talking about visual effects in Chrome while browsing the source tree? This is special effect somewhere in bundle_github.js (look for CSS class js-slide-to). 1. You can download that JS file and look into it for concrete working example. 2. With Prototype you can set global event

Re: [Proto-Scripty] Themes, UI Controls, and the Future of Prototype/Scriptaculous

2011-08-13 Thread Victor
about unobtrusive creation? You can create DatePicker and ComboBox when the input field becomes focused first time. -- With best regards, Victor -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: optgroup IE 8-

2011-08-18 Thread Victor
Sometimes IE refuses to insert options created with new Element() or innerHTML into SELECT or OPTGROUP. Approach with new Option() is more reliable (at least for me) while still cross-browser. -- You received this message because you are subscribed to the Google Groups Prototype

[Proto-Scripty] Re: things that I'd love to see on the next verion of prototype

2011-08-22 Thread Victor
+1 for mouse wheel event and ajax abort and timeout. String.prototype.trim AKA strip() is already here. E-mail validation pattern is under big question, e.g. regexp fully compatible with RFC 2822 will look like

Re: [Proto-Scripty] help needed.

2011-08-22 Thread Victor
var lis = $('slide-images').getElementsByTagName('li'); nobody knows about $$ and CSS selectors :) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: CSV to Json

2011-08-22 Thread Victor
You can invert your {'fields': [{'field':'fname', 'col':2}, {'field':'ssn', 'col':5}]} to something like ['field0', 'field1', 'fname', 'field3', 'field4', 'ssn'] and then zip it (Enumerable#zip) with every CSV row. -- You received this message because you are subscribed to the Google Groups

[Proto-Scripty] Re: Organizing my dom:loaded event

2011-08-23 Thread Victor
I think it will be slower than separate selectors: 1. Single complex selector will require additional time to parse and merge nodes into single result. 2. After that you will use additional checks - the same as in your selectors. -- You received this message because you are subscribed to the

[Proto-Scripty] Re: Effect.Morph zIndex style not working

2011-08-23 Thread Victor
I see in Firefox 3.6 that z-index is not changed at all. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/lP4DA5SSbLAJ. To post to

[Proto-Scripty] Re: IE 7 New Element problem

2011-08-24 Thread Victor
I used similar things with new Element(tagName, {style:...}) earlier, but after strange behavior of IE I prefer to use new Element(tagName).setStyle({width:x,height:y}) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this

[Proto-Scripty] Re: Pluck enumeration itt

2011-08-24 Thread Victor
For Enumeration (Hash, ObjectRange etc.) use Enumeration#each var index = -1; enumeration.each(function(e, i) { if (e === 'bar') { index = i; // looking for the first occurrence throw $break; } }); for Array you can use shorter var index = ['foo','bar','baz'].indexOf('bar');

[Proto-Scripty] Re: Generating invalid HTML for purpose of custom attributes

2011-08-25 Thread Victor
Sorry for late answer, but there are my few coins on custom attributes. For XHTML solution exists many years - from the beginning of XHTML itself: XML namespaces. Define custom attributes in custom namespace, and the resulting XHTML page will be perfectly valid. Example (stripped from working

[Proto-Scripty] Re: Prototype's evolution

2011-08-25 Thread Victor
Hello Andrew! Great to see that someone from developers still reading this list. You didn't cleared the situation about lighthouse bug tracker and code patches. Will someone somehow react to the bug messages, questions about code, proposed patches etc.? Or posting bugs/wishes/patches in bug

[Proto-Scripty] Re: Why Element.Storage?

2011-08-29 Thread Victor
Hi! If you like to browse source code, then you can answer by yourself. Just search for prototype_event_registry in sources. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: Why Element.Storage?

2011-08-30 Thread Victor
OK, it is used in stopObserving to clean observers, mainly for IE (look at function _destroyCache) to prevent memory leaks. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: [Scriptaculous Autocomplete] Why cant I Override oncomplete

2011-09-01 Thread Victor
You can highlight matched characters while creating response on the server side like in this sample: optionspan class=\informal\This will not pass into answer/spanbHighlighted part/bNot highlighted part/option -- You received this message because you are subscribed to the Google Groups

[Proto-Scripty] Re: [Scriptaculous Autocomplete] Why cant I Override oncomplete

2011-09-01 Thread Victor
Also why you cannot override some method? It is simple like Ajax.MyAutocompleter = Class.create(Ajax.Autocompleter, { onComplete: function($super, request) { $super(request); } }); or you want to replace existing method in existing class? -- You received this message because you are

[Proto-Scripty] Re: Possible bug with arrays and classes

2011-09-01 Thread Victor
I think it should look like var base = Class.create({ iterations: 0, initialize: function(item) { this.iterations++; //this.collection = []; this.collection.push(item); console.log('Iterations: %s, Number items in Collection: %s', this.iterations,

[Proto-Scripty] Re: Prototype's evolution

2011-09-01 Thread Victor
Fine. Here is a list of my Prototype tickets (not counting tickets for Prototype documentation): 1269https://prototype.lighthouseapp.com/projects/8886/tickets/1269-eventjs-bug-in-issimulatedmouseenterleaveeventnew event.js - bug in

[Proto-Scripty] Re: Possible bug with arrays and classes

2011-09-01 Thread Victor
It's kinda feature, not issue ;) You expect that method references in base.prototype will be visible in child classes, and array reference behaves similarly. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion

[Proto-Scripty] Re: Element.cleanWhitespace not recursive?

2011-09-02 Thread Victor
cleanWhitespace should not be recursive, at least for inline elements. E.g. for HTML fragment bithe/i ispace/i/b user will see output * thespace* (single word) instead of *the space* (two distinct space-separated words), which isn't correct. -- You received this message because you are

[Proto-Scripty] Re: Acceptable nicks(s) For Prototype.js

2011-09-15 Thread Victor
For me it is just Prototype (without dot-j-s) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/mhngjWsE3-sJ. To post to this group,

[Proto-Scripty] Re: about IExplorer failure

2011-09-15 Thread Victor
GET requests are idempotenthttp://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html: the side-effects of N 0 identical requests is the same as for a single request, so from the browser and proxy point of view repeating GET requests should return the same result, and they can instantly use cached

[Proto-Scripty] Re: I'm stuck: Can't open window in combination with jQuery libs

2011-09-15 Thread Victor
Can you give more info? The full text in popup? What is window.js? Why you want to use both Prototype and jQuery on the same page? Where is your jQuery.noConflict()? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this

[Proto-Scripty] Re: I'm stuck: Can't open window in combination with jQuery libs

2011-09-19 Thread Victor
After jQuery.noConflict() all the functionality of jQuery is still accessible - just replace $ with jQuery everywhere you need to use jQuery. Look at documentation http://api.jquery.com/jQuery.noConflict/. -- You received this message because you are subscribed to the Google Groups Prototype

[Proto-Scripty] Re: What performs better? 30 observers on specific elements or 1 Observer observing every click?

2011-10-17 Thread Victor
You can use some dispatching mechanism, e.g.: 1. HTML: all your clickable elements have special class or attribute like a class=widget chooserchooser/a or a data-widget-type=chooserchooser/a 2. JS: your single observer finds somehow your desired element and dispatches event accordingly to the

[Proto-Scripty] Re: Rant - IE7 Sucks

2011-10-27 Thread Victor
I think there is some problem in your code, because code similar to your description exists e.g. in Scriptaculous: Effect.Base = Class.create({ position: null, start: function(options) { ... }, ... }); Effect.Parallel = Class.create(Effect.Base, { initialize: function(effects) {

Re: [Proto-Scripty] Re: Form.Serialize returning nada

2011-10-27 Thread Victor
Problem is somehow related to XHTML and IE9. If you occasionally serve document as xhtml+xml, document should pass validation to work in browser. I've noticed form name=... in your example, but *name* attribute is obsolete for *form* tag in XHTML1.0, or maybe you have *nbsp;* somewhere in your

Re: [Proto-Scripty] Re: Form.Serialize returning nada

2011-10-27 Thread Victor
I used the form name attribute as a way of knowing which AJAX module to call on behalf of that form. That allows my dofill() to serve many forms. This can be made via CSS classes, not name attributes. I've seen very few pages of any type that validates 100% 1-2 errors/warnings does not

[Proto-Scripty] Re: Prototype's Event system need to be fixed

2011-10-27 Thread Victor
I've seen on github that event system is reworked, but this is still work in progress. You can download bleeding-edge version and test for yourself. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web

[Proto-Scripty] Re: An idea from jQuery which might be borrowed to Prototype

2011-10-27 Thread Victor
Jon Dow == John Doe? ;) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/2jp7KMInIvAJ. To post to this group, send email to

[Proto-Scripty] Re: method ON vs OBSERVE

2011-10-28 Thread Victor
Here is the code (borrowed from some project) I'm using for bubbling focus and blur events: /** * Bubbling focus:in and focus:out events. * Usage: * document.on(focus:in, selector, focusHandler); // on focus * document.on(focus:out, selector, blurHandler); // on blur */ (function() {

[Proto-Scripty] Re: What performs better? 30 observers on specific elements or 1 Observer observing every click?

2011-10-28 Thread Victor
you suggest adding one special class or attribute to all clickable elements, so that in my observer I can check for that class/attribute in the very first line minimizing the amount of if statements yes PLUS you suggest to delegate the triggered event to the [clicked] element to

[Proto-Scripty] Re: Done but with errors on when page loads.

2011-10-28 Thread Victor
You are trying to invoke methods on not extended element in IE8, right? E.g. instead of $(element).fire(some:thing) you are using element.fire(some:thing). -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on

[Proto-Scripty] Re: decisions decisions -- json - ajax - html and dom kungfu

2011-11-09 Thread Victor
So you plan to receive JSON from server, then convert it to HTML and insert into page? HTML fragments are much easier in writing/validating/processing. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the

[Proto-Scripty] Re: Prototype AJAX call IE6 - not working

2011-11-09 Thread Victor
[offtop] Jessica, do you know about much shorter synonym of document.getElementById()? [/offtop] -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: BGEffects: Animate your background images!

2011-11-15 Thread Victor
Cool -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/mOo4ab0uQ-UJ. To post to this group, send email to

Re: [Proto-Scripty] Re: Where is ver. 2.0 is coming?

2011-11-29 Thread Victor
Take a look at RightJS http://rightjs.org/ - it is very close to Prototype+Scripty, and (still) has very operative support at Google groupshttps://groups.google.com/forum/?hl=rupli=1#%21forum/rightjs -- You received this message because you are subscribed to the Google Groups Prototype

Re: [Proto-Scripty] Re: Where is ver. 2.0 is coming?

2011-11-29 Thread Victor
Also CoffeeScript sometimes generates very ugly code. Example: CoffeeScript: SelectParser.select_to_array = (select) - parser = new SelectParser() parser.add_node( child ) for child in select.childNodes parser.parsed Generated JavaScript: SelectParser.select_to_array = function(select) {

[Proto-Scripty] Is someone working on Scripty2?

2011-11-29 Thread Victor
Is Scripty2 still developed? Or it is as alive (half-dead, actually) as Prototype? I've posted tickets on both projects in Lighthouseapp but no response... -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on

[Proto-Scripty] Re: Where is ver. 2.0 is coming?

2011-12-01 Thread Victor
1. Declaration with value assignment 2. Declare loop variables and cache length inside of for() - this can increase performance http://jsperf.com/caching-array-length/67 - caching length outside of for() is slower in almost all results (all Firefox and Safari, IE9 and some Chrome results) 3.

[Proto-Scripty] Re: Event.on bound to element only

2011-12-23 Thread Victor
Don't worry - use Function#bind(): Event.on($(id), click, function (event, element) { // this === element === $(id) }); var object = {}; Event.on($(id), click, function (event, element) { // this === object // element === $(id) }.bind(object)); -- You received this message because you

[Proto-Scripty] Re: I need to get what class is creating in initialize method

2012-01-10 Thread Victor
this.constructor -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/PyRvfGebg24J. To post to this group, send email to

[Proto-Scripty] Re: I need to get what class is creating in initialize method

2012-01-10 Thread Victor
As part of scriptaculous' unit test: testAnonSubclass: function() { var C1 = Class.create({ method1: function() { return C1; } }), C2 = Class.create(C1, { method2: function() { return C2; },

[Proto-Scripty] Re: patches to autocompleter

2012-01-11 Thread Victor
Hello! ...everyone who was using autocompleter in production has a couple of patches :( let's start to share? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: Select range of array items

2012-01-12 Thread Victor
automagically :) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/je-nzPkGXDEJ. To post to this group, send email to

[Proto-Scripty] Re: patches to autocompleter

2012-01-16 Thread Victor
Hello! One of the big issues I rand into was the way different browsers handle scrolling the results window, and how the window controls is treated as a loss of focus in some browsers. Do you can describe this with more words? I cannot remember such problem, at least as the big issue. I

[Proto-Scripty] Re: patches to autocompleter

2012-01-20 Thread Victor
On browsers other than FF, clicking on the scroll bar would cause a loss of focus, which would hide the results window. I've fixed this too ;) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web

[Proto-Scripty] Re: no compatibility google add and my class (prototype)

2012-01-25 Thread Victor
What is var Errror; Error = { }; (note the difference between *Errror* and *Error*) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: Order of Event Handler

2012-02-10 Thread Victor
Hello! I just thought there would be a common pattern to this problem as i almost can't believe that we're the first ones that need to 'pause' event handlers without removing them. Yes, this is a common problem without easy solution. As T.J. Crowder said, better try to find another

Re: [Proto-Scripty] Re: no compatibility google add and my class (prototype)

2012-02-10 Thread Victor
1. You cannot use the name `Error` - there is already global object named Errorhttps://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error. Try with another name. 2. You can shorten your code a bit: var User = Class.create({ // methods }); -- You received this message because

[Proto-Scripty] Re: cant quite figure out how to process multiple forms to one processing script.

2012-02-10 Thread Victor
1. Element identifiers should be unique, in other words, if any form or field has identifier - it should not repeat in other forms. 2. When submitting form via script, it has option for the name of desired submit button, e.g. for form with two submit buttons: form id=formId2 input type=submit

[Proto-Scripty] Re: Ajax.Autocompleter doesnt work on firefox

2012-02-12 Thread Victor
Using Prototype 1.7, Scriptaculous 1.9, Ajaxtags 1.5.7-SNAPSHOT - all autocompleters are working fine in any imaginable browser, including Firefox 3.6 - 10.0. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion

[Proto-Scripty] Re: IE invalid calling object addMethods

2012-02-26 Thread Victor
You shouldn't pass non-functions to Element.addMethods(SELECT, {}). You have fields like __ddObject in your _selectOptions - they are causing error while IE tries to methodize() them. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us

[Proto-Scripty] Re: IE invalid calling object addMethods

2012-02-26 Thread Victor
NOTE: doesn't work in IE9, but seems to work in IE7, and IE8. This example doesn't work in FF 10 also. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: IE invalid calling object addMethods

2012-02-26 Thread Victor
Whoops, I was wrong :) The problem is in _selectOptions.size() - there is already property named `size` in HTMLSelectElement (at least both in IE and FF) and in cannot be overwritten properly. -- You received this message because you are subscribed to the Google Groups Prototype

[Proto-Scripty] Re: IE invalid calling object addMethods

2012-03-05 Thread Victor
Thanks for the tip Victor. I do try to decode with IE, and I am using IETester, but my primary box is IE9, so it is a bit tricky. I suppose if I didn't have all your help I'd be forced to undust and old machine! I use Vista + IE8 + latest IE9 platform preview + IETester (with IE6...IE8

Re: [Proto-Scripty] Confused on setValue encoding

2012-03-05 Thread Victor
Is this supported across all the browsers? I'm still hoping to get some input on the setValue method and the encoding that takes place behind the sheets. I'd like to use this method and don't understand the behavior. setValue() for hidden input just assigns element.value = value;

[Proto-Scripty] Re: IE display problems using protoype.js

2012-03-08 Thread Victor
This is on the prototype.js file (version 1.5.0) all other browsers are fine Do you have tried to update to newest Prototype and Scriptaculous versions? Also you maybe forgot to use $() on element before invoking methods from Prototype and Scripty - this is common problem in IE. -- You

[Proto-Scripty] Re: Remove certain text from the title attribute

2012-03-08 Thread Victor
I want to delete the a href=http://www.google.com; and the / a If I understood, you need to read about string operations and regular expressions in JavaScript, e.g. from https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/replace -- You received this message

[Proto-Scripty] Re: Using Scriptaculous for slide down effect in some dynamic JS:

2012-03-08 Thread Victor
new Effect.SlideDown(expandEle, {duration: 3}); , But to no avail What exactly is not working? You can make example at jsbin.com - we can find some solution faster. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view

[Proto-Scripty] Re: Object doesn't support property or method 'observe'

2012-03-28 Thread Victor
I am having a problem with a plug in I am using. ContentFlow. It works fine in all browsers except IE8 and 7, Are you talking about jQuery plugin ContentFlow? Then try to use jQuery.noconflict() http://api.jquery.com/jQuery.noConflict/ -- You received this message because you are

[Proto-Scripty] Re: Ajax.Updater output garbled only on iPhone first load

2012-04-02 Thread Victor
When a user loads my page for the first time on an iPhone, the two portions of the page generated by an Ajax.Updater call are garbled - they look as if a binary file were injected into the page or the character map was scrambled. If the user then reloads the page, or uses the page's

[Proto-Scripty] Re: Ajax.Updater output garbled only on iPhone first load

2012-04-04 Thread Victor
Is the response header `Content-Type` always properly set? (e.g. Content-Type: text/html;charset=UTF-8) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: Ajax.Updater output garbled only on iPhone first load

2012-04-05 Thread Victor
This turned out to be a page loading/timing issue. The original poster resolved it by switching from document.observe('dom:loaded… to Event.observe(window,'load'… Does dom:loaded not trigger correctly on the iPhone or something? It sounds possible. Prototype now has 4 ways to detect

[Proto-Scripty] Re: qUnit equivalent for Prototype?

2012-04-12 Thread Victor
Is qunit not working when Prototype is on page? AFAIK it isn't depending on any framework http://docs.jquery.com/Qunit To use QUnit, you have to include its qunit.js http://code.jquery.com/qunit/qunit-git.js and qunit.css http://code.jquery.com/qunit/qunit-git.css files and provide a basic

[Proto-Scripty] Re: Ajax.Request fails, while vanilla XHR works fine

2012-04-12 Thread Victor
Same browser (Safari.latest) on the same computer, the Prototype method gives me a security failure (Origin [my host] is not allowed by Access-Control-Allow-Origin.) while the long-hand XHR (inside a Prototype observer) just works without any comment: Two differences I can notice: 1.

[Proto-Scripty] Re: Ajax.Request fails, while vanilla XHR works fine

2012-04-12 Thread Victor
Is header 'Access-Control-Allow-Origin' present in responses for both examples? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

Re: [Proto-Scripty] Re: Ajax.Request fails, while vanilla XHR works fine

2012-04-13 Thread Victor
It seems to be an issue on their server (BaseHTTP/0.3 Python/2.7.1+ according to FireBug). I'll file a bug and see what happens. XHR without setRequestHeader sends usual 'GET' request: Request URL: http://zip.elevenbasetwo.com/?zip=a Request Method: GET Status Code: 404 Not Found *Request

[Proto-Scripty] Re: Function#methodize

2012-04-16 Thread Victor
Where is the second argument in multiplier()? I'll try to explain in example: function multiplier(obj, times) { times = isNaN(times) ? 2 : times; if (typeof obj.value != 'undefined') { return obj.value * times; } else { alert(obj + ': does not have a value property!'); } }

[Proto-Scripty] Re: The callee (server [not server application]) is not available and disappeared

2012-04-16 Thread Victor
IMHO this happens because you make connections between objects of different windows (opener and popup): arrXXX in popup window points to objects from opener, opener element attributes point to strings/functions belonging to particular popup window (which is really closed). Array in opener

[Proto-Scripty] Re: a few widgets

2012-04-17 Thread Victor
I created a few widgets for the prototype and script.aculo.us. See here https://github.com/fntzr/astra_z In your Get started instruction script goes before link - some people probably will literally copy this sample. Would be more correct to show that styles should be included before

[Proto-Scripty] Re: a few widgets

2012-04-18 Thread Victor
Hi! Do you use any source formatting tools? Formatted source will be easier to develop/support. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: Prototype v1.6.0.2 - Changing $ Dollar Currency to £ Sterling

2012-04-19 Thread Victor
It is very doubtful to me that someone was able to write OOP code (e.g. return this.sub_total() + this.tax()), CSS selectors, properly use inject() in calculations but wasn't able to replace character in string literals. -- You received this message because you are subscribed to the Google

[Proto-Scripty] Re: Prototype v1.6.0.2 - Changing $ Dollar Currency to £ Sterling

2012-04-19 Thread Victor
Try to use unicode \u00a3 instead of single character £ -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/-RT66iGyuVEJ. To post to

Re: [Proto-Scripty] The callee (server [not server application]) is not available and disappeared

2012-06-25 Thread Victor
Maybe try Object.toJSON() and then String#evalJSON()? You'll be transferring to main context single string. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] Re: Correct use Event.on form submit

2012-06-26 Thread Victor
Is this correct? this.__z__handleSubmit = this.form.on('submit', this.__handleSubmit. bindAsEventListener(this)); Is the bindAsEventListener necessary? I want to get back the Event Handler so I can later destroy it with: this.__z__handleSubmit.stop(); this.__handleSubmit.bind(this)

[Proto-Scripty] Re: Drag'n drop and strange z-index issue

2012-06-26 Thread Victor
In short words, B element after dragging becomes z-index: 0 instead of original z-index: auto and establishes new local stacking context. The logic in startDrag()/finishDrag() methods should be fixed to properly restore initial z-index for z-index: auto (now it defaults to 0). -- You received

[Proto-Scripty] Re: Drag'n drop and strange z-index issue

2012-06-26 Thread Victor
How can it be fixed? in startDrag() (dragdrop.js): if (this.options.zindex) { // FIXED z-index: auto - z-index: 0 // was this.originalZ = parseInt(Element.getStyle(this.element, 'z-index') || 0, 10); this.originalZ = Element.getStyle(this.element, 'z-index');

[Proto-Scripty] Re: Correct use Event.on form submit

2012-06-27 Thread Victor
That is not conveniently tied to any event handler, so what is the convenient means of disconnecting it, as in __eventHandler.stop(); ? Sorry, I've not completely understood this phrase. I'll repeat myself: // start observer - bindAsEventListener isn't needed this.__z__handleSubmit =

[Proto-Scripty] Re: Form.serialize for multiple selects broken in 1.7.0.0?

2012-06-28 Thread Victor
When using v1.6.0.2 and serializing a form with a multiple select list, I would get its value like myselect[]=foomyselect[]=bar. In v1.7.0.0 it's posting the value like myselect[]=foo,bar. This does not work properly on the backend (Rails). Is this expected behavior? Yes, Prototype 1.7

[Proto-Scripty] Re: Help with element.setattribute

2012-06-30 Thread Victor
Hello! You can do it in many ways: 1. Create an empty placeholder for hidden input (div at the bottom of your form). You can then easily replace content of this div and don't care about multiple inputs: addElement: function () { $(totalsContainer).update('input type=hidden id=finaltons

[Proto-Scripty] Re: prototyp.js is receiving a null value

2012-07-16 Thread Victor
First fix missing *.js and *.gif files and incorrect markup. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/A4of2UOIkWIJ. To post

Re: [Proto-Scripty] Re: run function with AJAX.Updater

2012-07-30 Thread Victor
Here is the page being called . . . script type=text/javascript sayHi = function(){ alert ('Hi'); }; /script input type=button value=Click Me onclick=sayHi()/ My problem is that if I replace *alert* with *document.write* then the page gets replaced with a new page. I thought the

[Proto-Scripty] Re: equal height problem with nested divs in product grid

2012-07-31 Thread Victor
// select all div.item element within the current div.product-grid element var columns = r.select('div.item'); // make each div.item element as high as the current div.product-grid element columns.invoke('setStyle', {height: rowHeight + 'px'});

[Proto-Scripty] Re: PrototypeJS memory leak when using Class.create()

2012-07-31 Thread Victor
Theoretically it is needed when you want to explore hierarchy of classes, practically it was used only once in jPlex http://code.google.com/p/jplex/ -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web

[Proto-Scripty] Re: Any reason why this might not work?

2012-08-09 Thread Victor
It may fail because this code may overwrite element's properties (and in some browsers like IE and Opera some attributes, mapped as element properties). E.g. $(someInput).store(name, foo).store(type, bar); Better will be some separate container to store values inside, but this leads to

Re: [Proto-Scripty] Any reason why this might not work?

2012-08-09 Thread Victor
Internet explorer doesn't like object definitions without quotes around the names Hmm... example from Prototype 1.7 sources: Object.extend(methods, { getStorage: getStorage, store: store, retrieve: retrieve }); Quotes are required for properties matching reserved

[Proto-Scripty] Re: Event observer not working in version prototype 1.7 but works fine in 1.5

2012-08-09 Thread Victor
Form.YooEventObserver = Class.create({Abstract.EventObserver, { minQueryLength: 3, getValue: function() { // return YAHOO.util.Connect.setForm(this.element); //return Form.serialize(this.element); }, // ... other methods }); -- You received this message because you are

[Proto-Scripty] Enumerate all classes

2012-08-09 Thread Victor
Hello! I need some more ideas how to enumerate all classes - find at runtime (in browser) all classes created with Class.create(). My initial approach: function enumerateClasses() { for (var p in window) { var c = window[p]; if (Object.isFunction(c)

Re: [Proto-Scripty] Any reason why this might not work?

2012-08-10 Thread Victor
Would this construction: e._prototypeStorage = e._prototypeStorage || {} fall afoul of the issue that Jason pointed out? Would IE bork the assignment because the key wasn't in hash form and quoted? It will work fine. I've not found any specific property name which will require quotes

Re: [Proto-Scripty] Any reason why this might not work?

2012-08-10 Thread Victor
I've had many instances where a javascript block would work in modern standards compliant browsers yet fail silently in IE until I put quotes in, single or double. Please, show any example of such code. -- You received this message because you are subscribed to the Google Groups

[Proto-Scripty] Re: Event observer not working in version prototype 1.7 but works fine in 1.5

2012-08-10 Thread Victor
1. /assets/preload.js:1 http://yoopedia.dev/assets/preload.js 1. Uncaught ReferenceError: Form is not defined yoo:361http://yoopedia.dev/mainpage/yoo#_=_ 1. Uncaught ReferenceError: Form is not defined yoo:549http://yoopedia.dev/mainpage/yoo#_=_ 1. Uncaught

[Proto-Scripty] Re: Event observer not working in version prototype 1.7 but works fine in 1.5

2012-08-13 Thread Victor
Yes these are loaded properly, here are the include order of these file Can you verify this in your browser? Also, there may be syntax error in some of javascript files. Try to comment them one by one until error message (Uncaught Error: ExecJS::ProgramError: Unexpected token: operator

[Proto-Scripty] Re: AJAX Request: receive base64 encoded image in responseText

2012-08-15 Thread Victor
I checked the response header and it's Content-Type: text/html; charset=UTF-8. Unfortunately I couldn't check the response because it's empty. Is response empty in network sniffer/web inspector? Or in javascript code? Printing the return-part in my controller I got the correct

[Proto-Scripty] Re: AJAX Request: receive base64 encoded image in responseText

2012-08-16 Thread Victor
Is response empty in network sniffer/web inspector? Or in javascript code? The response is already empty in web inspector. Very bad You should check if it is actually written to HTTP response (maybe response is already flushed). If I return some HTML in addition to my base64 string

  1   2   >