[Proto-Scripty] How should I model this if extending the DOM is bad?

2010-11-04 Thread Luke
) with switch-cases for the types of paragraphs. Actually even with extending the DOM I'm not totally sure how I would catch the edit-clicking event. As I said, I'm kind of stuck :). Can you help me with ideas? How would you do this? Thanks a lot, Luke -- You received this message because you

[Proto-Scripty] Re: How should I model this if extending the DOM is bad?

2010-11-07 Thread Luke
of a paragraph, video and etc On 4 ноя, 23:09, Luke kickingje...@gmail.com wrote: Hi, sorry for the non-descriptive topic, I couldn't think of anything better. However, I'm currently working on a project where you can create simple webpages by adding different types of paragraphs, (eg

[Proto-Scripty] Extending a DOM-Object

2010-11-21 Thread Luke
Hi, is there anyting wrong with extending a DOM-Object with $('myelement').myvariable = something; or why is there the prototype-method store, which saves values in a seperate hash? Thank you, Lukas -- You received this message because you are subscribed to the Google Groups Prototype

[Proto-Scripty] Re: Extending a DOM-Object

2010-11-21 Thread Luke
ok. But is it? Can't find any documentation or specification on this Luke On Nov 21, 8:50 pm, Walter Lee Davis wa...@wdstudio.com wrote: I think that the basic reason for the separate store is to provide   insulation from any current, past, or future browsers tramping on a   key name you may

[Proto-Scripty] Re: Extending a DOM-Object

2010-11-22 Thread Luke
the whole point of working with prototype. How do other people work with this? Luke On Nov 22, 7:37 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Luke, What you're talking about doing is called an expando property. They're not covered by a standard AFAIK, although interestingly

[Proto-Scripty] Class Inheritance Properties

2010-11-29 Thread Luke
of the subclass rather than replacing it? Can I maybe somehow access the parent's property from the subclass to manually extend it? Thanks, Luke -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype

[Proto-Scripty] Re: Class Inheritance Properties

2010-11-29 Thread Luke
the child's method it is passed to... . On Nov 29, 1:23 pm, Johan Arensman johanm...@gmail.com wrote: You can use the $super parameter name to access the property of the parent class. See:http://api.prototypejs.org/language/Class/create/ On Mon, Nov 29, 2010 at 12:15 PM, Luke kickingje

[Proto-Scripty] Is it possible to add multiple funtions to an Ajax-callback like onSuccess?

2010-11-29 Thread Luke
Hi the topic says it all. Can you somehow call multiple functions for a callback of Ajax.Request? Like new Ajax.Request(url, { onSuccess: [function(){}, function(){}] }); I know emthat/em doesn't work. But is there maybe another way? I've seen there are Ajax.Responders (

[Proto-Scripty] Re: Is it possible to add multiple funtions to an Ajax-callback like onSuccess?

2010-11-29 Thread Luke
On Nov 29, 7:19 pm, Walter Lee Davis wa...@wdstudio.com wrote: Will that work for you? Indeed! Thought things were more complicated ;). Thanks! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to

[Proto-Scripty] Anything wrong with adding a function called 'click' to the global Element-namespace?

2010-12-02 Thread Luke
Hi, I think it's pretty annoying to write myelement.observe('click', function(event){ // do stuff event.stop() }); for every link etc for which you want to replace the click- functionality. So I added a Method to Element that does the observer- invoking and event-stopping for me

[Proto-Scripty] Prototype class-instances sharing properties

2010-12-04 Thread Luke
Hi, I've got a weird behavior here, or rather a behavior I don't understand. If you take the following Class: --- var SomeClass = Class.create({ rbBuffer: nulll, setBuffer: function(val) { this.rbBuffer = val; }, getBuffer: function() { return this.rbBuffer; } }); --- and

[Proto-Scripty] How to create a new DOM-element from a string?

2010-12-06 Thread Luke
Hi, I'm loading some plain HTML via Ajax.Request and insert it in a DIV. I need to perform some extensions on the HTML I load though, which brought me to the idea to create DOM from the loaded markup, extend it and insert it. So my question is: Is there a convenient way to create DOM from a

[Proto-Scripty] Re: Anything wrong with adding a function called 'click' to the global Element-namespace?

2010-12-07 Thread Luke
, 10:36, Luke kickingje...@gmail.com wrote: Hi, I think it's pretty annoying to write myelement.observe('click', function(event){         // do stuff         event.stop() }); for every link etc for which you want to replace the click- functionality. So I added a Method

[Proto-Scripty] Re: How to create a new DOM-element from a string?

2010-12-07 Thread Luke
Thanks Walter! On Dec 6, 6:28 pm, Walter Lee Davis wa...@wdstudio.com wrote: On Dec 6, 2010, at 12:12 PM, Walter Lee Davis wrote: It's OT for this list, but have a look at Prototype.js. You can   create a new DOM element in memory, and do all the things you want   to it without ever

[Proto-Scripty] Re: How to create a new DOM-element from a string?

2010-12-07 Thread Luke
Hmm, damn. the returned value is still a string :( On Dec 7, 9:16 am, Luke kickingje...@gmail.com wrote: Thanks Walter! On Dec 6, 6:28 pm, Walter Lee Davis wa...@wdstudio.com wrote: On Dec 6, 2010, at 12:12 PM, Walter Lee Davis wrote: It's OT for this list, but have a look

[Proto-Scripty] Re: Prototype class-instances sharing properties

2010-12-07 Thread Luke
SomeClass = Class.create({  initialize: function(name) {     this.rbBuffer = {};   },  setBuffer: function(val) {    this.rbBuffer.test = val;  }, . . . hope it helped cheers yuval On Sat, Dec 4, 2010 at 5:01 PM, Luke kickingje...@gmail.com wrote: Hi, I've got a weird

[Proto-Scripty] Observe once

2010-12-07 Thread Luke
Hi, I'm doing an internship in a company where they bought a script for modals called 'Lightview' ( http://www.nickstakenburg.com/projects/lightview/ ), so I'm kinda stuck with using it. The problem is that instead of many other libraries, you cannot pass lightview any callbackfunctions as

[Proto-Scripty] Re: How to create a new DOM-element from a string?

2010-12-07 Thread Luke
... Walter On Dec 7, 2010, at 3:20 AM, Luke wrote: Hmm, damn. the returned value is still a string :( On Dec 7, 9:16 am, Luke kickingje...@gmail.com wrote: Thanks Walter! On Dec 6, 6:28 pm, Walter Lee Davis wa...@wdstudio.com wrote: On Dec 6, 2010, at 12:12 PM, Walter Lee Davis

[Proto-Scripty] Re: How to create a new DOM-element from a string?

2010-12-07 Thread Luke
not understand your question/goal. -Original Message- From: prototype-scriptaculous@googlegroups.com [mailto:prototype-scriptacul...@googlegroups.com] On Behalf Of Luke Sent: Tuesday, December 07, 2010 9:59 AM To: Prototype script.aculo.us Subject: [Proto-Scripty] Re: How to create a new

[Proto-Scripty] Re: How to create a new DOM-element from a string?

2010-12-08 Thread Luke
, I'd be   happy to remove it and put it back in the parameters hash where I   believe it belongs. Walter On Dec 7, 2010, at 12:53 PM, Luke wrote: Ok, what I wanna do is this: - var mystring = 'div class=somethingptext a href=#link/a/ ppMore text/pimg src=asd //div'; var

[Proto-Scripty] Extending the Object-Class

2010-12-10 Thread Luke
Hi, is it ok to extend Object ( http://api.prototypejs.org/language/Object/ ) with a custom function (I mean regarding name-conflicts, I want to name my function extendWrapped)? Or is it a Class that should better not be touched for some reason? It seems to be pretty deep in the core of

[Proto-Scripty] Re: Extending the Object-Class

2010-12-13 Thread Luke
www / crowder software / com On Dec 11, 12:07 am, Luke kickingje...@gmail.com wrote: Hi, is it ok to extend Object (http://api.prototypejs.org/language/Object/ ) with a custom function (I mean regarding name-conflicts, I want to name my function extendWrapped)? Or is it a Class

[Proto-Scripty] Can I change what new [someClass] will return?

2010-12-16 Thread Luke
Hi, if you define a Class like -- var TestClass = Class.create({ initialize: function(element) { element = $(element); this.doFunkyStuffWithElement(element) return element; },

[Proto-Scripty] Is there a way to get the name of a class from within the class?

2010-12-16 Thread Luke
Hi, If you define a class like var MyCoolClass = Class.create({ initialize: function() { // find out classname here } }); can you get the name of the class from within itself? After all it's just a variable-name, but is it somehow accessible? Thank you Lukas -- You received this

[Proto-Scripty] Re: Can I change what new [someClass] will return?

2010-12-17 Thread Luke
...@gmail.com wrote: On 16 December 2010 16:36, Luke kickingje...@gmail.com wrote: Hi, if you define a Class like -- var TestClass = Class.create({        initialize: function(element) {                element = $(element

[Proto-Scripty] Re: Is there a way to get the name of a class from within the class?

2010-12-17 Thread Luke
I take that as a no? On Dec 16, 6:02 pm, bernard bernard.christophe...@gmail.com wrote: I truly wish some people would take the trouble to buy a javascript book instead of off-topic-posting in this group... meh. b. Intellectual honesty consists in taking ideas seriously. To take ideas

[Proto-Scripty] Re: Can I change what new [someClass] will return?

2010-12-17 Thread Luke
Sounds good. Can you post a link to your source (if you want to share it and have it on github or something)? On Dec 17, 11:08 am, Richard Quadling rquadl...@gmail.com wrote: On 17 December 2010 08:32, Luke kickingje...@gmail.com wrote: Hi Richard, thanks for your reply

[Proto-Scripty] Re: Can I change what new [someClass] will return?

2010-12-17 Thread Luke
Ok, that works great. Thank you Richard! On Dec 17, 11:17 am, Richard Quadling rquadl...@gmail.com wrote: On 17 December 2010 10:14, Luke kickingje...@gmail.com wrote: Sounds good. Can you post a link to your source (if you want to share it and have it on github or something)? I don't use

[Proto-Scripty] Re: Is there a way to get the name of a class from within the class?

2010-12-17 Thread Luke
Ok, thanks T.J., I really wanted to get the name of the Class as a string. The reason is this: I'm working on a project that lets you create really simple webpages by adding, editing and removing objects (images, text, ..) to your page. To structure my code I do 2 things: 1.) I create classes

[Proto-Scripty] Re: Is there a way to get the name of a class from within the class?

2010-12-17 Thread Luke
elements (e.g., in a lazy way), but I prefer the explicit `createSpecial` because it happens at the time the class is created, as an explicit action of the author. FWIW, -- T.J. :-) On Dec 17, 2:46 pm, Luke kickingje...@gmail.com wrote: Ok, thanks T.J., I really wanted to get

[Proto-Scripty] Re: Prototype 1.7 EvalJSON Error Sintax on Date Eval

2011-01-07 Thread Luke
Afaik a JSON-Object (or string) must be wrapped in {}. What you have is an array (your string's wrapped with [ ]). Try: { [ {Aspirante_id:37, AspirantesComentarios_id: 6, Comentario:asdfadsf, Who:nahum, When: new Date(1294268679000) } ] } or

[Proto-Scripty] Re: I wrote a dropdown multiselect also

2011-01-12 Thread Luke
nice! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] Re: number sign (#) in a select option - gets truncated

2011-01-14 Thread Luke
Is the hash mark part of the request URL? If so it probably strips it because it's interpreted as an anchor and not part of a http-request to a file. If not so: We can haz (relevant) codez? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us

Re: [Proto-Scripty] Re: How to show the full resolution image at clicking on thumnail

2011-01-14 Thread Luke
Why don't you ask in the jQuery-Group? https://groups.google.com/forum/?fromgroups#!forum/jquery-en -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To

Re: [Proto-Scripty] Re: How to show the full resolution image at clicking on thumnail

2011-01-14 Thread Luke
Also, posting a hell lot of code without structure or documentation probably won't get you anywhere. Try to strip everything down to there very relevant parts, comment your code and post again (here: https://groups.google.com/forum/?fromgroups#!forum/jquery-en ). -- You received this message

[Proto-Scripty] Re: Draggable always visible in overflow:hidden parent div

2011-01-27 Thread Luke
Hi there, you can do this with the snap-paramter. It 'normally' takes a value, but you can also pass it a function that sets the boundaries for your draggable element: new Draggable('element', { snap: function(x, y) { return[ (x 200) ? (x 0 ? x : 0 ) : 200,

[Proto-Scripty] Re: Strange ajax behaviour with effect.morph

2011-01-27 Thread Luke
Hi Rey, you shouldn't use timers for this - you canot be sure when an ajaxrequest has finished loading. There are parameters both in the ajax-methods and in morph that take functions that will be called on a specific event like when the ajax-call has been loaded (these are called callbacks).

[Proto-Scripty] How to handle non-'px' values if you want to get an element's line-height

2011-02-08 Thread Luke
Hi, I need to calculate the line-height of an element. Unfortunately I cannot predict in which unit it will be set*** but I need to find out its px-value. If it is set in em or percent I can calculate it from the font-size, but that again could also be set in em or percent too. So I'm

[Proto-Scripty] Why is there a $super-Parameter?

2011-03-18 Thread Luke
Hi, I'm working on my bachelor-thesis and I'm trying to understand a few things. I'm wondering: Why is there the construct of the $super-parameter in Prototype's class-implementation? Is anything wrong with calling this.parent.myfunction()? Why did they implement that? This is more of a

Re: [Proto-Scripty] Why is there a $super-Parameter?

2011-03-18 Thread Luke
Sounds logical ;) No really, thx :) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] Re: Why is there a $super-Parameter?

2011-03-18 Thread Luke
Thanks a lot TJ that helps! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] What do you think of this software-architecture?

2011-03-18 Thread Luke
Hi again, I'm working on a little project that lets users create (very) simple websites. On his site the user can add sections (like a text or a big image or a video) one below the other. Each section can be edited by clicking a link underneath the section. So to structure my code, and give me

[Proto-Scripty] Re: Why is there a $super-Parameter?

2011-03-24 Thread Luke
It's late, but I have to ask something though that it still don't understand. Why *doesn't* prototype just add a reference to the parent-class in subclasses? Like klass.prototype.superclass = superclass ...in Class.Create. Is it because the *this*-reference would go out of scope? -- You

[Proto-Scripty] Prototype itself throws errors in IE7

2011-08-26 Thread Luke
Hi I'm trying to get a project I'm working on IE7-proof and I'm running into errors right from the start. The project is almost finished so I'm already including a lot of scripts and already have a lot of markup. When I load my page I get the error Object doesn't support this property or

[Proto-Scripty] Aw: Re: Prototype itself throws errors in IE7

2011-08-29 Thread Luke
Ok, thank you guys but the problem was something different. It's almost emberassing ^^. I simply included prototype.js twice. While every normal Browser doesn't care, IE7 throws the above mentioned errors. Thanks though for your responses and sorry for having wasted your time ;) Lukas -- You

[Proto-Scripty] Using only one draghandle in a sortable List

2011-09-23 Thread Luke
Hi there, I have a list where, when I hover its items, an overlay with an edit-link (and some other stuff) is shown. Now I'm trying to make that list sortable with Scriptaculous' Sortable. The problem is that I overlay the listitems with the mentioned edit-link-stuff and therefore cannot click

[Proto-Scripty] Re: Using only one draghandle in a sortable List

2011-09-23 Thread Luke
Nevermind, I refactored the code, this isnt nexxessary anymore. -- 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/-/Gjf9O2Fh5bYJ. To

[Proto-Scripty] onDrop in Sortable

2011-09-23 Thread Luke
Hi, it seems there's no callback for 'onDrop' (like in Droppable) in Scriptaculous' Sortable. Is there any way to call a function whenever an element's dropped in Sortable? Thanks Lukas -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us

[Proto-Scripty] Stopping events using Prototype 1.6.1 in IE9 / how compatible is Prototype 1.7 with 1.6.1?

2011-10-15 Thread Luke
Hi, I'm currently trying to make my site compatible with IE9 and there's already a major problem. I'm using Prototype 1.6.1 and it seems events won't be stopped with Event.stop anymore in IE9. I've read on Stackoverflow [1] Prototype 1.7 fixes that problem but I'm not sure if I should update.

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

2011-10-17 Thread Luke
Do I understand this right that 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 PLUS you suggest to delegate the triggered event to the

[Proto-Scripty] Adding CSS-Rules to a styletag in Prototype

2011-10-17 Thread Luke
Hi there, I wanna add CSS-Definitions to a style-tag using Prototype. In all good browsers (ALL^IE) this works by simplay appending a CSS-String to the desired style-tag. IE doesn't like this though. I found [1] that in IE you can update the entire contents of the style-tag using an attribute

Re: [Proto-Scripty] Re: Adding CSS-Rules to a styletag in Prototype

2011-10-20 Thread Luke
Thanks, Joe T. Walter: The problem is, that on my page the user can add/remove contents and also change the styles of those contents dynamically using JS. Now if you set a Style to certain elements, either via changing the style-tag or adding a class-name and *afterwards* add content, that

[Proto-Scripty] Re: Stopping events using Prototype 1.6.1 in IE9 / how compatible is Prototype 1.7 with 1.6.1?

2011-10-20 Thread Luke
Thanks Andrew. I tried upgrading. So far I don't see any problems, Good job! :) -- 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