[Proto-Scripty] Re: getElementByTagName - object doesn't support property...

2011-06-24 Thread Matt Petrovic
$F gets the value of a form element, not the element itself. You're feeding a string into that function, and strings don't have the getElementsByTagName method. Use $ instead. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To

Re: [Proto-Scripty] Re: ajax.updater - json to fill select

2011-06-07 Thread Matt Petrovic
Updater expects the return result to be (X)HTML. It drops the response directly into the container as is. You should be returning an HTML string, or using Ajax.Request to get the JSON, convert it into HTML and dropping it in place. If you want to be hackish about it, you do your converting in

Re: [Proto-Scripty] how-to add option to select

2011-06-07 Thread Matt Petrovic
try using Ajax.Request -- 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/-/QTllMU5xRkRZMllK. To post to this group, send email to

[Proto-Scripty] Re: wierd setStyle Backgroundimage happenings..

2011-01-06 Thread Matt
ahh, both very good ideas. I will try the path change one first, then the class change if that does not work. Thank you guys. -- 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] wierd setStyle Backgroundimage happenings..

2011-01-05 Thread Matt
), 'mouseleave', function() { $(featured).setStyle({background : 'url(../images/site/ border_main.png)'}); }); do you see why this setstyle is not working? or perhaps know a better way of extending rollover functionality between seperate divs? Thanks, Matt -- You received

[Proto-Scripty] Re: Finding the position of a scroll bar for an element with overflow:auto

2010-11-08 Thread Matt Foster
yeah, try $(myContainer).scrollTop On Nov 7, 5:10 pm, Shane McCarron halindr...@gmail.com wrote: I have an element that has overflow:auto.  The contents of the element are updated from time to time via ajax calls.  I want to ensure that when this happens, if the user has scrolled down into

[Proto-Scripty] Rails UJS data-remote fires on any click

2010-11-07 Thread Matt Smart
Hello, I was wondering if was intentional for ajax links (link_to ... :remote = true ... ) to fire on any click. I want links to behave where a left click fires of the ajax request, but a right click can allow you to copy link location or open in a new tab, depending on your browser. I found

[Proto-Scripty] Re: Variables in $$() ?????

2010-09-30 Thread Matt Foster
Thanks for that but like most things in the prototype documentation, it lacks the type of clarity that I can understand. Nice way to get help... Your docs suck so just spoon feed me the answer The answer to your initial approach is an issue with basic javascript string behavior and was nailed

[Proto-Scripty] Re: Passing Variables to Functions in addEventListener Within a Class

2010-07-23 Thread Matt Foster
You can just add parameters to the bind call and they will show up in execution. $(id).observe('mousedown', this.myFunction.bind(this, otherParam); Then I believe it shows up after the event. function myFunction(event, param){... but in your case, simply binding to this will allow you to

[Proto-Scripty] Re: Ajax abort method

2010-07-23 Thread Matt Foster
I did something similar in that I just patched Ajax.Request with some extra functionality to allow timeouts, I never fussed with it further than fundamental tests but it certainly worked. Take a peak and maybe you can learn how to write something to meet your own needs

[Proto-Scripty] Re: How do I remove and stash an observer?

2010-07-23 Thread Matt Foster
just store the reference to the listener and re-attach it to the element after the user has successfully purchased more comment tokens or whatnot. var myListener = function(){}; $(button).stopObserving(); //.. user buys tokens... $(button).observe('click', myListener); --

[Proto-Scripty] referencing div when class event triggered.

2010-07-09 Thread Matt
Hello, I am trying to figure out how to reference a specific div after it has been mouseOver, when i have an observe on a class-name that a bunch of div's share. The reason for this i want the code to be expandable where i can have multiple boxes with the same class, sharing all CSS properties,

[Proto-Scripty] Re: morph effects on menu roll-over.. better way?

2010-07-05 Thread Matt
for anyone who has emailed me regarding seeing the code for the solution; i dont like posting code for project that have not been released, but i can give you the jist o the solution so you can apply it to your specific needs. I got everything (information wise) i needed to figure out the queue

[Proto-Scripty] Re: morph effects on menu roll-over.. better way?

2010-07-04 Thread Matt
I tried putting the morph calls in parallel and it really just changed the responsiveness of the rollover affect making it more 'stiff' and less fluid when multiple menu items were selected in succession. The affect i am trying to get it achieved by my first script (currently running on the test

[Proto-Scripty] Re: morph effects on menu roll-over.. better way?

2010-07-04 Thread Matt
Hey joe t., i was just coming here to reply that i solved the problem using the queue functionality of script.aculo.us. I created a separate queue for each divider and simply clear all morphs before adding a new one, so there is never the possibility of a morph finishing after its been

[Proto-Scripty] morph effects on menu roll-over.. better way?

2010-07-01 Thread Matt
not sure if they would apply in this situation. here is the test page: http://al-linplumbing.com/js_menutest.html the code can be viewed by viewing the page source as to not clutter up the post. if i need to explain the effect i am trying to achieve more, please let me know. Thanks, Matt -- You

[Proto-Scripty] Can't seem to get AJAX form validation to work in conjunction with Codeigniter

2010-06-16 Thread Matt
. I'd post code, but I have about 15 examples of things I've tried and it would just clutter this question. Any ideas? :-( I didn't think form validation would be this difficult. Many thanks, - Matt -- You received this message because you are subscribed to the Google Groups Prototype

[Proto-Scripty] Re: Can't seem to get AJAX form validation to work in conjunction with Codeigniter

2010-06-16 Thread Matt
a separate URL than that which the form is being submitted to? If so, how would I do that? - Matt On Jun 16, 12:47 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, You _might_ be able to get it to work with a synchronous ajax call, but I wouldn't recommend it, the user experience would be pretty

[Proto-Scripty] Re: Can't seem to get AJAX form validation to work in conjunction with Codeigniter

2010-06-16 Thread Matt
').submit(); } }, onFailure: function() { document.getElementById('searchkeywordvalidate').innerHTML = 'An error has occurred.'; } }); }); }); /script Thanks again. - Matt On Jun 16, 9:32 pm, Matt m...@postzero.com wrote: Thanks.  This is very helpful. What

[Proto-Scripty] Re: How would I get a closer set of siblings?

2010-04-28 Thread Matt Foster
level, and I don't want all the paragraphs, just the ones between this head and the next head. (It's for an accordion effect.) So while up('div').select('p') would do exactly what you say, it would leave me where I started. Thanks, Walter On Feb 22, 2010, at 5:46 PM, Matt Foster

Re: [Proto-Scripty] Created elements work properly in Firefox, but not IE7. Why?

2010-02-05 Thread Matt Milburn
. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- Matt Milburn President, Web Developer Graphic Designer Phone: (405) 213-4353 AIM: wavemotion777 Wave Motion Studios www.wavemotionstudios.com -- You received this message because you

[Proto-Scripty] Re: AsyncExecutioner

2010-01-12 Thread Matt Foster
Feel free to post questions or comments here as I disabled them on the actual article. I think this is a valuable plugin for Prototype, it certainly isn't a common use case but there are instances where data gets too big to handle in one shot. On Jan 11, 9:51 am, Matt Foster mattfoste

[Proto-Scripty] AsyncExecutioner

2010-01-11 Thread Matt Foster
in execution in order for regular UI processing to be handled, such as scrolling or selecting text. It can be extremely useful for less than pertinent processing that can be carried on in the background. http://positionabsolute.net/blog/2010/01/asynchronous-execution.php Regards, Matt

[Proto-Scripty] Re: self-or-ancestor in one whack?

2009-12-22 Thread Matt Foster
You could use a closure to ensure you're dealing with the right element. $$('.my_table td').each(function(cell){ cell.observe('mouseover', listener.curry(cell)); }); function listener(cell, evt){ if(evt.element() != cell) return false; } Are you trying to have a clean

[Proto-Scripty] Re: Complete graphical toolkit in js

2009-12-18 Thread Matt Foster
Ext.js has a ton of UI stuff prebaked http://extjs.com -- http://positionabsolute.net On Dec 18, 4:40 am, Frédéric f...@gbiloba.org wrote: Hi, I'm wondering: does it exist a complete graphical toolkit in javascript? Something like Qt or Gtk, which allows to build complex GUI? I found

[Proto-Scripty] Re: Multi-dimensional JSON passed in an Ajax request?

2009-12-18 Thread Matt Foster
I'd just put it in a variable. parameters : '?method=saveDatadata='+data.toJSON(); -- http://positionabsolute.net On Dec 17, 6:48 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Ajax.Updater (and the rest) don't claim to post object graphs to the server, and in fact they don't. They

[Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

2009-11-24 Thread Matt Foster
I'd recommend taking a look at my Ajax Service Queue approach, such that all requests go through the service object, and in the subclass for the queue's case won't send the next request until its predecessor has returned. It needs to be updated for 1.6 but the idea is on the wall for you to look

[Proto-Scripty] Re: Stopping an enumeration

2009-11-09 Thread Matt Foster
I'd like to use enumeration functions to select from a sorted list where I know that if the select function has passed and then starts failing (returns false) This isn't a prime situation for Enumerable but certainly nothing it can't handle. Never mind - I just discovered $break in the

[Proto-Scripty] Re: Effect.Morph to enlarge images

2009-11-05 Thread Matt Foster
You could use a fisheye... http://positionabsolute.net/blog/2007/08/prototype-fisheye.php On Nov 3, 12:55 pm, ph...@ryangibbons.net ph...@ryangibbons.net wrote: Richard, Thanks for the response.  Question though, I am not quit sure what you mean.  I would like the image  the enlarge upon

[Proto-Scripty] Re: Insert , Defer and Is there a better way?

2009-11-05 Thread Matt Foster
Hey Kiran, Function.defer is simply delegating the functions execution to Function.delay which in the end delegates it to a wrapper of window.setTimeout. By using defer it enforces the timeout to be a value of 0.01 which is just enough to hiccup the browser's procedural processing. If your

[Proto-Scripty] Re: Insert , Defer and Is there a better way?

2009-11-05 Thread Matt Foster
()... By executing your code in those methods, you can be sure that DOM elements are loaded and ready for manipulation via Javascript. -- http://positionabsolute.net On Nov 5, 3:22 pm, Matt Foster mattfoste...@gmail.com wrote: Hey Kiran, Function.defer is simply delegating the functions

[Proto-Scripty] Prototype gadget for client side translation

2009-11-03 Thread Matt Foster
reloads the page. Nor does it destructively handle node collection, so all of your event handlers remain intact... Check it out http://positionabsolute.net/blog/2009/10/google-translate-gadget-site-translation.php Cheers, Matt --~--~-~--~~~---~--~~ You received

[Proto-Scripty] onComplete functions firing after HTTP/1.1 connection closed

2009-10-26 Thread matt...@bytemark.co.uk
I'm trying to use Prototype to do some basic Ajaxy things for the first time in ages, and have run into a problem that I've seen reported before, but with no replies:

[Proto-Scripty] Re: onChange in Dynamic Element not working in IE6

2009-10-26 Thread Matt Foster
This one was a SOB and as always, IE is at fault... Here is what I found on researching this... now this is for IE only of course.. var cell = new Element(td); This is all well and good w/o any attributes, the Element constructor delegates the attributes object, the second parameter to

[Proto-Scripty] Re: Depreciation of Array#reduce

2009-10-23 Thread Matt Foster
What is ES5? On Oct 23, 1:31 pm, Tobie Langel tobie.lan...@gmail.com wrote: We removed it because it conflicted with an identically named method specified in ES5. If you really need to use it, I strongly sugest you find another name for it. Best, Tobie

[Proto-Scripty] Re: Tying an Element and a custom class together

2009-10-22 Thread Matt Foster
Yeah that'd be great functionality to allow for a much simpler proxy On Oct 19, 9:48 am, Eric lefauv...@gmail.com wrote: Matt, I like your way of doing it, but my concern is that the documented toElement() method seems to be only half implemented. A minor change to the $() function could

[Proto-Scripty] Re: Tying an Element and a custom class together

2009-10-16 Thread Matt Foster
The has a relationship is the only way to go for sure. You could create an ElementProxy class that inherits all the Element methods but just keeps a reference to the actual DOM reference internally. All of the Element.Methods are parameterized so I'm sure there'd be an easy way to delegate the

[Proto-Scripty] Re: Tying an Element and a custom class together

2009-10-16 Thread Matt Foster
))); }; } }); -- http://positionabsolute.net On Oct 16, 3:01 pm, Matt Foster mattfoste...@gmail.com wrote: The has a relationship is the only way to go for sure. You could create an ElementProxy class that inherits all the Element methods but just keeps a reference to the actual DOM reference internally

[Proto-Scripty] Re: how to select all elements by class after a certain point?

2009-10-12 Thread Matt Foster
var nextElements=$(element).descendants();// returns everythign that This would return all children of the element, not siblings. On Oct 10, 4:26 am, Alex McAuley webmas...@thecarmarketplace.com wrote: If you use Event with element you can find the element that was clicked

[Proto-Scripty] Re: Submit form on select for autosuggest

2009-10-12 Thread Matt Foster
'].submit();         } /scriptThanks, Yogesh Matt Foster wrote:http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleterafterUpdateElement function... you receive an input object and some element that was representing the field. At this point you could execute form.submit.. --http

[Proto-Scripty] Re: how to select all elements by class after a certain point?

2009-10-12 Thread Matt Foster
webmas...@thecarmarketplace.com wrote: Hence the note on it This might not work as its divs. Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Matt Foster mattfoste...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com

[Proto-Scripty] Re: Submit form on select for autosuggest

2009-10-12 Thread Matt Foster
$(searchcustomerform).submit(); Cheers, Matt On Oct 12, 3:02 pm, Yogesh Agashe yogesh.aga...@gmail.com wrote: Hello, I am glad to say that I found the root of the problem. I had a button named submit and this was causing the problem. Thanks so much Matt for pointing out the function definition

[Proto-Scripty] Re: How to fire a custom/synthetic Control key + mouse scroll wheel movement event?

2009-10-11 Thread Matt Foster
point. Ctrl + mouse wheel scales the page not the text - it scales images, elements, text and everything LOL Alex Mcauleyhttp://www.thevacancymarket.com - Original Message - From: Matt Foster mattfoste...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous

[Proto-Scripty] Re: How to fire a custom/synthetic Control key + mouse scroll wheel movement event?

2009-10-08 Thread Matt Foster
So just as a recap, you're looking to simulate the ctrl + mouse wheel event such that the native processing for zoom magnification applies? This is a highly useful feature, I would love to add some widgets type icons (magnifier glasses with a + and -) on my site that allows people to rescale

[Proto-Scripty] Re: Event#observe on elements

2009-10-07 Thread Matt Foster
my question, is that I don't have to worry about using Event#stopObserving? On Tue, Oct 6, 2009 at 10:22 AM, Matt Foster mattfoste...@gmail.com wrote: The removed element? Just because an element has been detached from the visible DOM doesn't mean that the reference can be maintained

[Proto-Scripty] Re: Submit form on select for autosuggest

2009-10-07 Thread Matt Foster
http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter afterUpdateElement function... you receive an input object and some element that was representing the field. At this point you could execute form.submit.. -- http://positionabsolute.net On Oct 7, 11:19 am, Yogesh

[Proto-Scripty] Re: Variabalized containment

2009-10-07 Thread Matt Foster
http://prototypejs.org On Oct 6, 7:45 am, WLQ maybe...@gmail.com wrote: Sounds plausible, I would like to have more information on that please. On 5 Okt., 08:14, Alex McAuley webmas...@thecarmarketplace.com wrote: Why not give your list a class name thats specific to the list and select

[Proto-Scripty] Re: Event#observe on elements

2009-10-06 Thread Matt Foster
The removed element? Just because an element has been detached from the visible DOM doesn't mean that the reference can be maintained elsewhere. It would be no edge case to detach and re-attach a particular element, so to think that an element should be trashed just because it has no parent

[Proto-Scripty] Re: Range utility increment

2009-10-01 Thread Matt Foster
 pm, T.J. Crowder t...@crowdersoftware.com wrote: Matt, The ObjectRange `include` method looks like this:   function include(value) {     if (value this.start)       return false;     if (this.exclusive)       return value this.end;     return value = this.end;   } So if you create

[Proto-Scripty] Re: Range utility increment

2009-09-25 Thread Matt Foster
I'd just use an 'iterator' class to do this... var EvenNumber = Class.create( { initialize : function(num){ this.num = (num % 2 == 1) ? num - 1 : num; }, succ : function(){ return new

[Proto-Scripty] Re: Range utility increment

2009-09-25 Thread Matt Foster
/TJ's loop Alex Mcauleyhttp://www.thevacancymarket.com - Original Message - From: Matt Foster mattfoste...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Friday, September 25, 2009 5:57 PM Subject: [Proto-Scripty] Re: Range utility increment I'd

[Proto-Scripty] Prototype ajax history

2009-09-21 Thread Matt Foster
Hey Everyone, I've finished a project that handles the problems of browser history when implementing ajax solutions. It's built to integrate with prototype perfectly and borrows a lot of the same concepts. The idea is an event driven system where all XHRs go through a single 'service' object

[Proto-Scripty] Re: Prototype ajax history

2009-09-21 Thread Matt Foster
-- mona On Mon, Sep 21, 2009 at 7:00 PM, Matt Foster mattfoste...@gmail.com wrote: Hey Everyone,  I've finished a project that handles the problems of browser history when implementing ajax solutions.  It's built to integrate with prototype perfectly and borrows a lot of the same concepts

[Proto-Scripty] Scriptaculous onmouseover

2009-09-18 Thread Matt Johnson
So I'm creating a light-weight expanding and collapsing menu. I am using the morph property to expand and contract the height of the list items in the menu onmouseover. I am running into issues however where (once I've expanded the list) every time I rollover an item within the expanded list

[Proto-Scripty] Re: Element#Storage

2009-09-09 Thread Matt Foster
I agree with Jim, If I remove an element from the DOM for whatever reason, perhaps its a control widget that only gets inserted for inline editing or something. I don't want to re-apply listeners and proprietary data each time I reinsert the control back into the document. And this leads to

[Proto-Scripty] Re: More useful clone method

2009-08-28 Thread Matt Foster
);                         });                         });                 }     }     return newElement;   } On Aug 26, 9:43 am, watermark86 watermar...@gmail.com wrote: 1.6.1rc3 added Element.clone (which calls cloneNode). On Aug 25, 5:46 pm, Matt Foster mattfoste...@gmail.com wrote: Good luck with this,  let us know if it works out. Quick

[Proto-Scripty] Re: KEY_DOWN event

2009-08-25 Thread Matt Foster
The down arrow. Perhaps the preceding key up, key left and key right options could have given you a clue... On Aug 25, 8:07 am, Ooypunk ooyp...@gmail.com wrote: OK, then I'll go with that. Thanks! Only thing left for me to complain is that I still don't know what names like KEY_DOWN are

[Proto-Scripty] Re: More useful clone method

2009-08-25 Thread Matt Foster
Good luck with this, let us know if it works out. Quick glance at your code I can see an obvious error... var newElement = element.clone(true); //clone the node Element doesn't have a clone method. The native DOM element does have a cloneNode method though. --

[Proto-Scripty] Re: Reuse 'Effect' code for looping

2009-08-14 Thread Matt Foster
http://prototypejs.org/api/function/delay var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; var delayConstant = 1; arr.each(function(value, index){ (function(val){ $(myInput).value = val; }).delay(delayConstant * index,

[Proto-Scripty] Re: Casting a json object into an instance of a class

2009-08-13 Thread Matt Foster
You could just have the server return code that instantiates the object to begin with. You aren't limited to JSON its just convienent because the structure is simple and there are plenty of processors that understand it. But you can evaluate any JS code just as is. --

[Proto-Scripty] Re: image flickering with Effect.Morph

2009-08-13 Thread Matt Foster
I am trying to code an OS X-style menu bar with prototype Are you talking about the dock? http://positionabsolute.net/blog/2007/08/prototype-fisheye.php On Jul 13, 4:05 pm, Mario Colombo mario.colo...@yetnet.ch wrote: Hi everybody, I am trying to code an OS X-style menu bar with prototype

[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread Matt Foster
var keys = $H(obj).keys(); http://prototypejs.org/api/hash/keys -- http://positionabsolute.net On Aug 10, 10:46 am, Alex McAuley webmas...@thecarmarketplace.com wrote: You can prolly sort the order if you wanted it in some kind of order but its not needed in my opinion! Alex

[Proto-Scripty] Re: autosuggest feature enter button hack in new Ajax.Autocompleter

2009-08-07 Thread Matt Foster
I've never actually used this component but in researching the docs, could you use the callback for afterUpdateElement and then programatically execute the form's submit method? http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter -- http://positionabsolute.net On Aug 7, 10:11 

[Proto-Scripty] Re: Class with Ajax and onclick event

2009-08-05 Thread Matt Foster
Depending on when you wanted to pass the additional argument you could just attach it to the argument chain on bind this.changeContent = this.changeContent.bindAsEventListener(this, extraArgument); Since we're already looking at that line of code, be careful, reassigning the function to a bound

[Proto-Scripty] Re: Class.create and this keyword

2009-08-04 Thread Matt Foster
In an effort to keep the code clean I'd delegate this functionality to a dedicated method other than the constructor. On Aug 4, 2:16 pm, Matt Foster mattfoste...@gmail.com wrote: If you really wanted to avoid bind you could just use closures within the initialize method var Sub4

[Proto-Scripty] Re: Masked Input in Prototype

2009-08-03 Thread Matt Foster
: Wednesday, July 29, 2009 10:22 PM Subject: [Proto-Scripty] Re: Masked Input in Prototype something like this:http://digitalbush.com/projects/masked-input-plugin On 24 jul, 06:48, Richard Quadling rquadl...@googlemail.com wrote: 2009/7/23 Matt Foster mattfoste...@gmail.com: You must

[Proto-Scripty] Re: Class.create and this keyword

2009-08-03 Thread Matt Foster
Regardless of the JS framework. A closure is necessary for attaching class methods to a particular instance and preserve the instance reference via the this keyword. http://www.javascriptkit.com/javatutors/closures.shtml I thought Function.bind was pretty clean myself, but I guess you've got

[Proto-Scripty] Re: get controls array

2009-07-23 Thread Matt Foster
Hey Diego, I'd suggest learning CSS, in particular CSS Selectors. Second read up on prototype, you were a dollar sign away from almost having it. In your case, the name is too inconsistent, you could have almost gotten away with $$(input[name~=opt) but alas there is no space after it so

[Proto-Scripty] Re: Masked Input in Prototype

2009-07-23 Thread Matt Foster
You must further define your idea of masked input http://www.google.com/search?q=define%3A+masked+inputie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a On Jul 23, 3:58 pm, Celso cels...@gmail.com wrote: Anyone know a masked input in prototype? Thanks, Celso.

[Proto-Scripty] Re: Need help for performantly creating tooltips

2009-07-22 Thread Matt Foster
I think one of the easiest ways to handle tooltips is just let the native browser deal with it, using the title attribute with imgs and anchor elements will pop a 100 word tip on what the action will take. So just create the tool with a title attribute and then you're good to go. ---

[Proto-Scripty] Re: DataGrid

2009-07-17 Thread Matt Foster
That is nice, you should submit it to http://scipteka.com -- http://positionabsolute.net On Jul 17, 4:14 am, Alex McAuley webmas...@thecarmarketplace.com wrote: Nice data grid! ... what about inline editing of the cells ? .. i cant get it to work on firefox in your demo - Original

[Proto-Scripty] Re: Objects that return zero length

2009-07-15 Thread Matt Foster
,       edges: {         Brainwriting : {           color: black,           penwidth: 0.5,           fontname: Arial,           URL: javascript:void(predwin(2179)),           label: bull;    ,         } Ron blog.ideatree.us On Jul 14, 4:47 pm, Matt Foster mattfoste...@gmail.com wrote: Oh I get

[Proto-Scripty] Re: mixin of function not found

2009-07-14 Thread Matt Foster
(Vulnerable, {   initialize: function() {     this.health = 100;     this.dead = false;   } }); var bruce = new Person; bruce.wound(55); bruce.health; //- 45 On Jul 13, 4:22 pm, Matt Foster mattfoste...@gmail.com wrote: The second argument is accepting attributes of the HTML element

[Proto-Scripty] Re: Ajax Request Timeout

2009-07-14 Thread Matt Foster
--   getStatus: function() {     try {       return this.transport.status || 0;     } catch (e) { return 0 }   } --- so Firefox must leave the status undefined. @ Matt Foster : i tried your patch but it didn't work for me

[Proto-Scripty] Re: Objects that return zero length

2009-07-14 Thread Matt Foster
in an array shouldn't automatically return length 0. On Jul 14, 1:47 pm, Matt Foster mattfoste...@gmail.com wrote:  $A(attr.edges).each(function(edge) {      this.edge.set(id, new GraphEdge(cv, id, edge));    }, this); edge is your variable, why bother trying to set function

[Proto-Scripty] Re: Ajax Request Timeout

2009-07-14 Thread Matt Foster
Yeah I discuss the idea of having its own event for timing out in my article. The argument is a timeout is a failure, its failed to retrieve a response in the given time. So a timeout is basically like an inherited event from onFailure. Question remains do you seperate the event or just add a

[Proto-Scripty] Re: select option by value

2009-07-07 Thread Matt Foster
You could use many of the enumerable methods, this seems a bit verbose but gets the job done. Enumerable.find will iterate over the collection until the iteration function returns a value of true. I could have used each, but potentially would have iterated more than necessary, as we'd really

[Proto-Scripty] Re: Events in own Class

2009-06-30 Thread Matt Foster
. Is it the right way or not? thanks, rgds sven On 29 Jun., 20:17, Matt Foster mattfoste...@gmail.com wrote: I ran into this same issue and made a class to extend others from to inherit this sort of functionality. This is the article but the JS itself is a bit outdatedhttp

[Proto-Scripty] Re: Events in own Class

2009-06-29 Thread Matt Foster
I ran into this same issue and made a class to extend others from to inherit this sort of functionality. This is the article but the JS itself is a bit outdated http://positionabsolute.net/blog/2007/06/event-dispatcher.php To get the freshest JS...

[Proto-Scripty] Re: Working out where a user is on the page

2009-06-11 Thread Matt Foster
When your event fires just get the scroll properties from the window, Prototype has a convenient method just for this purpose. http://prototypejs.org/api/document/viewport/getscrolloffsets -- http://positionabsolute.net On Jun 11, 9:30 am, Jeztah webmas...@thecarmarketplace.com wrote: At the

[Proto-Scripty] Returning scriptaculous drag/drop elements via ajax

2009-06-08 Thread Matt
that this is because dropzone is 'hidden' by the fact that it has come back by ajax. Is there any way round this? Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post

[Proto-Scripty] Re: HTML breaks JSON

2009-06-08 Thread Matt Foster
- Original Message - From: Matt guitarroman...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Friday, June 05, 2009 10:05 AM Subject: [Proto-Scripty] Re: HTML breaks JSON Hi Alex, Still didn't work for me :( Just produced broken HTML output again

[Proto-Scripty] Re: HTML breaks JSON

2009-06-05 Thread Matt
data (JSON) as p $post=str_replace('\', '', $_POST['p']); $json=$post; $d=json_decode($json,true); foreach($d as $key=$val) { .. do what you will with it after this unless you know the key names !! This should do the trick for you HTH ALex - Original Message - From: Matt i

[Proto-Scripty] Re: Event.toggle

2009-06-05 Thread Matt Foster
Is there a way to initially load the page with the map open and then close it after a timed period? Better yet, is there some way to load it with it hidden but not chopped up? Yeah, having it display:none or visibility:hidden can muck up the calculations of the containers dimensions. I'd

[Proto-Scripty] Re: HTML breaks JSON

2009-06-04 Thread Matt
have a foolproof method? Cheers Matt On Apr 24, 9:54 pm, Matt Foster mattfoste...@gmail.com wrote: What are you sending to PHP's json_encode?  It is expecting a structure to serialize into a JSON syntax string. $struct = array(message = h1Hello World/h1Who says we can't have any kind

[Proto-Scripty] Re: How can I get a list of events fired by an object?

2009-05-28 Thread Matt Foster
The iframe element doesn't support any events[1]. You can indeed listen to the load event directly from the IFrame element. http://pastie.org/493154 The document that it contains may support various events (such as load, click, etc.). Why would a document inside an iframe not support these

[Proto-Scripty] Re: How can I get a list of events fired by an object?

2009-05-26 Thread Matt Foster
src changes.   The underlying problem was how to keep an iframe sized to match its   contents. While you get one onload event when the frame finishes   loading, no others are ever fired, even when you navigate to a   different page within the iframe. Walter On May 21, 2009, at 5:05 PM, Matt

[Proto-Scripty] Re: How can I get a list of events fired by an object?

2009-05-21 Thread Matt Foster
You could find a list of all events and listen to them each, there isn't an all operator to listen to any event that is fired as far as I know... function allYourEventAreBelongToUs(e){ console.log(You hit an event %o, e); } $w(load unload click dblclick ...).each(function(evenType){

[Proto-Scripty] Re: Observe onmouseover and onmouseout with IE6

2009-05-21 Thread Matt Foster
What is surprising to me is that the this scope ever actually worked inside the event handlers. Had you left the handle alone I know that Proto would have bound the element to the handler such that this would assume the value of the element, but since you explicitly set this via bind in the

[Proto-Scripty] Re: Check element class against array

2009-05-14 Thread Matt Foster
var test = ['foo', 'bar', 'foob']; if (test.any(element.hasClassName.bind(element))) { I believe using the non-methodized version of this method would be better Element.hasClassName.curry(element); -- http://positionabsolute.net On May 14, 12:30 pm, T.J. Crowder

[Proto-Scripty] Re: Check element class against array

2009-05-14 Thread Matt Foster
the difference in processing time of TJ's suggestions. It will be called often (from a Form Observer). For now I am using this one:                         if (_validate_field_classes.any(element.hasClassName.bind (element))) { Wasn't aware of the any function. Matt. I tried swapping

[Proto-Scripty] Re: Please Help With Code

2009-05-08 Thread Matt Foster
I think he's looking for a snippet handout, by the looks of the spaghetti that he's pasted he's trying to highlight a single item in a menu. var activeElement = false; $$(ul.menu li).invoke(observe, click, function(e){ var element = e.element(); if(activeElement)

[Proto-Scripty] Re: Ajaxio next step?

2009-05-05 Thread Matt Foster
Another good one is www.mindmeister.com, I doubt they've got an API for you to work with but maybe you can get some ideas. Its built with Proto/scripty, but they use a canvas object instead of SVG so it could be a bonus for your IE requirement. -- http://positionabsolute.net On May 5,

[Proto-Scripty] Re: Effect.Appear doesn't work when in queue

2009-05-01 Thread Matt Foster
In looking at your code, there were a few HTML mistakes. First your try me element doesn't have a proper closing div tag its just /div no greater than to close the tag. You've also does this on your input buttons, input objects are considered simple, meaning they have no children, so having a

[Proto-Scripty] Re: Event.observe

2009-04-29 Thread Matt Foster
Hey Brent, Do you have a demo page that displays this issue? My only thoughts are that the elements are getting reloaded in the DOM yet not getting the events attached. -- http://positionabsolute.net On Apr 29, 2:59 pm, BrentNicholas brentnicho...@gmail.com wrote: Hi all, So I

[Proto-Scripty] Re: pimp my snippet?

2009-04-29 Thread Matt Foster
Just to have fun with it... var val = $F(file); if(val.lastIndexOf( ) val.lastIndexOf(/)) On Apr 29, 2:52 pm, Walter Lee Davis wa...@wdstudio.com wrote: Aha, but what about spaces in folders leading up to that filename? I   don't mind those, since I only end up with the file, not the

[Proto-Scripty] Re: Extracting methods from codebase

2009-04-29 Thread Matt Foster
I'd set up each class or major structure, such as Element, Enumerable, etc etc as its own file, then define packages such as minimal, efficient, advanced, ajax...etc. Then in a server side script it will bundle these files together depending on the package so you could make a request something

[Proto-Scripty] HTML breaks JSON

2009-04-24 Thread Matt
approaching this correctly, fundamentally? Is JSON supposed to contain HTML? Thanks, Matt --~--~-~--~~~---~--~~ 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: HTML breaks JSON

2009-04-24 Thread Matt Foster
is there as part of a larger design, but there may or may not be implementation restrictions. If you are facing problems, can you try encoding the HTML string (Base64) and decoding back (using Javascript Base64 code ) before display on the browser? On Fri, Apr 24, 2009 at 11:30 AM, Matt

[Proto-Scripty] Re: Observe div content change?

2009-04-22 Thread Matt Foster
Anath's idea would be ideal but I am not sure how supported that event actually is. Alternatively, it'd be a bit more work but still would satisfy your event requisite of just firing off you own event when you update. var oldHTML = ele.innerHTML; ele.update(text); ele.fire(x:update, { oldHTML

  1   2   3   >