[Proto-Scripty] Re: drag between sortables - how to pass sortable id to db

2009-07-24 Thread DJ Mangus
you could probably just add the id to the params object directly before you pass it to the Ajax.Request On Thu, Jul 23, 2009 at 12:13 PM, johnb jbcen...@gmail.com wrote: I have a small app using sortables where you can re-order within them but also drag them between different sortables,

[Proto-Scripty] Re: Which parameters are affected by Effect.Move()

2009-07-24 Thread DJ Mangus
If you know the original values of x and y you shouldn't have to know the current value to use effect.Move if you use mode: 'absolute' unless I am misunderstanding what you are trying to do, can you explain in a little bit more detail? (an example would be nice) On Thu, Jul 23, 2009 at 11:20

[Proto-Scripty] Re: how to use scripts without clicks

2009-07-28 Thread DJ Mangus
document.observe(dom:loaded, function() { // initially hide all containers for tab content $$('div.tabcontent').invoke('hide'); }); Note: you can of course do anything you want in that function. The function runs when everything is loaded and available to javascript. On Tue, Jul 28, 2009

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-03 Thread DJ Mangus
Is the password-form submit button a return from procBasketEmail.php? if so then you should observe it in the OnSuccess callback. If that isn't correct chalk it up to me checking this moments after awakening. On Mon, Aug 3, 2009 at 6:23 AM, Ashashley.kenner...@gmail.com wrote: Thanks for the

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-05 Thread DJ Mangus
Try adding e.preventDefault(); instead of Event.stop(e) and let me know if that works? On Tue, Aug 4, 2009 at 4:55 PM, Ashashley.kenner...@gmail.com wrote: function callProcBasketEmail(e) {    var pars = Form.serialize('email-form');    var myAjax = new Ajax.Updater('email-response',

[Proto-Scripty] Re: Browser scroller position after Ajax.Update

2009-08-05 Thread DJ Mangus
Maybe this might help. http://www.prototypejs.org/api/element/scrollto On Wed, Aug 5, 2009 at 1:33 PM, DJJQjoll...@hotmail.com wrote: Oh my god my english was terrible in my post, sorry about that. I'll try to explain the problem again: On my php page I have a link a long way down the page,

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-05 Thread DJ Mangus
in either. I think it is the Event.observe('password-form', 'submit', callProcBasketPassword); which is not working properly, although I don't know how to debug it On Aug 5, 6:48 pm, DJ Mangus d.man...@gmail.com wrote: Try adding e.preventDefault(); instead of Event.stop(e) and let me know

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-05 Thread DJ Mangus
Unfortunately I don't know why both errors are caused, can you help please? On Aug 5, 9:40 pm, DJ Mangus d.man...@gmail.com wrote: Are you getting any Javascript errors? Note: firefox and firebug is your friend. Don't forget to break on all errors. On Wed, Aug 5, 2009 at 11:22 AM

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-05 Thread DJ Mangus
in the DOM, not sure where to look for it in the DOM tab of firebug? Is this correct? On Aug 5, 10:06 pm, DJ Mangus d.man...@gmail.com wrote: nods when Firebug breaks on the error, check the DOM tab to see the state at that particular moment. On Wed, Aug 5, 2009 at 2:05 PM, Alex McAuleywebmas

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-05 Thread DJ Mangus
, the email-response div gets populated with the form i'm trying to observe, so the question is, why is the onSuccess running before the DOM has been updated? On Aug 5, 10:17 pm, DJ Mangus d.man...@gmail.com wrote: actually just checked firebug, best place would be html tab.  DOM tab lists

[Proto-Scripty] Re: Browser scroller position after Ajax.Update

2009-08-05 Thread DJ Mangus
The only problem with that solution is you provide no degradation to people without javascript. On 8/5/09, DJJQ joll...@hotmail.com wrote: Thank you for your solution, but instead I changed a href=# to a href=javascript:null() and it works like a charm. On Aug 5, 11:00 pm, Alex McAuley

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-05 Thread DJ Mangus
to be used in certain cases? I'm happy that it's working but I would really like to learn the basics properly. Thanks anyway for getting me up and running! Ashley On Aug 5, 10:32 pm, DJ Mangus d.man...@gmail.com wrote: good question. You might change Event.observe( . . . etc

[Proto-Scripty] Re: Browser scroller position after Ajax.Update

2009-08-05 Thread DJ Mangus
pretty much yes but some shut it off for security reasons On Wed, Aug 5, 2009 at 3:01 PM, DJJQjoll...@hotmail.com wrote: Ok. I thought everyone had javscript by now :) On Aug 5, 11:39 pm, DJ Mangus d.man...@gmail.com wrote: The only problem with that solution is you provide no degradation

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-05 Thread DJ Mangus
to use ajax methods correctly On Aug 5, 10:48 pm, DJ Mangus d.man...@gmail.com wrote: yes but onSuccess shouldn't be called until after the ajax.updater is completed.  Therefore the DOM node should be available at that point. On Wed, Aug 5, 2009 at 2:40 PM, Alex McAuleywebmas

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-05 Thread DJ Mangus
) { Event.observe('password-form', 'submit', callProcBasketPassword); } }); Event.stop(e); } rather than testing for onSuccess? On Aug 5, 11:07 pm, DJ Mangus d.man...@gmail.com wrote: OK, just checked the source.  onComplete is where ajax.updater actually updates the node

[Proto-Scripty] Re: lightwindow not working after ajax update

2009-08-06 Thread DJ Mangus
Explain lightwindow for me, does it use javascript to display? If so then post that script too please. On 8/6/09, Martín Marqués martin.marq...@gmail.com wrote: We are working on and html page which has a div with id=container that gets updated when pressing link buttons that are on the top.

[Proto-Scripty] Re: Example values input text

2009-08-07 Thread DJ Mangus
I don't know of a plugin like that but shouldn't be too hard to port On 8/7/09, spielberg inmo...@gmail.com wrote: Hello to the people of the group. It´s my first question. Any one know abut something like this http://mucur.name/system/jquery_example/ to prototype?? I need to use the element

[Proto-Scripty] Re: Updating a form's clean state

2009-08-07 Thread DJ Mangus
You could implement your own reset method on your form object. On 8/7/09, mr_justin gro...@jperkins.otherinbox.com wrote: This is in no way a prototype related question, but we've got some pretty smart JavasScript people on here so I figured I'd pose the question. Here's the scenario: I

[Proto-Scripty] Re: lightwindow not working after ajax update

2009-08-07 Thread DJ Mangus
. http://www.stickmanlabs.com/lightwindow/ Nobody uses it? 2009/8/6 DJ Mangus d.man...@gmail.com: Explain lightwindow for me, does it use javascript to display?  If so then post that script too please. On 8/6/09, Martín Marqués martin.marq...@gmail.com wrote: We are working on and html page

[Proto-Scripty] Re: Updating a form's clean state

2009-08-07 Thread DJ Mangus
Of course. Shouldn't be really hard to implement your own reset though. Just keep a hash of initial values and ids (you can use http://www.prototypejs.org/api/element/identify to give elements w/o an id one) and upon customreset set them all back. Then if you save changes to server just update

[Proto-Scripty] Re: How to loop through array? New to Proto

2009-08-07 Thread DJ Mangus
Give them all a class of 'error' and use $$('error').each('hide') Note: drycoded on my phone so look those up before using them. On 8/7/09, trope jtrope...@gmail.com wrote: I have some code that appears to be a prime candidate for a loop. How could I wrap this up in one neat little

[Proto-Scripty] Re: spam click = buggy???

2009-08-09 Thread DJ Mangus
I can't get to the examples on my phone to check but do the examples use the event queue? If not that explains it, these effects run simultaneously and can get tangled unless you use the queue. You should be able to look event queues up for more info. Note: not all effects tangle which is why

[Proto-Scripty] Re: how to select multiple entries from a auto complete box?

2009-08-10 Thread DJ Mangus
If you use the script.aculo.us autocompleter the option you need to set is called tokens which takes either a string or an array of strings to reset on. Note: I haven't used autocompleter myself just looked up the info. On Mon, Aug 10, 2009 at 4:11 AM, Angelinemailangel...@gmail.com wrote:

[Proto-Scripty] Re: Making a Draggable-pool

2009-08-10 Thread DJ Mangus
Not sure I understand what you are wanting to do. If you mean drag from one location and the pop back so it can be dragged again, then yes you have full control over what happens during and after drags. Look in the documentation for the various callbacks you have available. On 8/10/09, Drr

[Proto-Scripty] Re: Dropping

2009-08-14 Thread DJ Mangus
Revert true then move it in the dom in your droopable callback. Should work for inline elements. On 8/14/09, Floyd Resler adexfl...@gmail.com wrote: I think you're right on that. I should have expanded my question. If the object isn't dropped on a Droppable object, how do I get it to go

[Proto-Scripty] Re: Observing a checkbox

2009-08-18 Thread DJ Mangus
Spec and reality often differ. On 8/18/09, ColinFine colin.f...@pace.com wrote: On Aug 13, 2:53 pm, Jeztah webmas...@thecarmarketplace.com wrote: What is the correct Cross browser way to observe a checkbox being checked or not I am using $('hidenonlive').observe('change',function()

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-18 Thread DJ Mangus
I can't help with the solution but since you need serverside processing anyway why not just do it all serverside? On 8/18/09, drewB dbats...@gmail.com wrote: Yes, by javascript I mean Prototype API. A simplified use case is as follows: A user has selected X pieces of furniture. On a

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-20 Thread DJ Mangus
Yes if your roundtrip is slow then doing it clientside can make it seem more responsive. There is the issue though of what happens if the server save fails? Revert your changes? Overall using serverside output is less troublesome, easier to code, and more robust. On 8/20/09, drewB

[Proto-Scripty] Re: scope of this in anonymous functions

2009-08-22 Thread DJ Mangus
Everything in js is an object. Even function literals. On 8/22/09, JoJo tokyot...@gmail.com wrote: How do I use bind? Doesn't the bind function take an object as an argument? I'm doing this stuff inside a class, not an object. On Aug 22, 6:15 pm, Gareth Evans agr...@gmail.com wrote: Use

[Proto-Scripty] Re: $H need help

2009-08-25 Thread DJ Mangus
gah, just looked at the source, I was wrong about that, ignore the last message I sent. On Tue, Aug 25, 2009 at 4:41 PM, DJ Mangus d.man...@gmail.com wrote: if you feed set() an object it should set multiple key/value pairs at once. On Tue, Aug 25, 2009 at 4:32 PM, Kevin Porter k

[Proto-Scripty] Re: Nested, Sortable lists

2009-09-01 Thread DJ Mangus
Methinks some code would help us figure out what you are doing and if we can help. On Mon, Aug 31, 2009 at 6:08 AM, Mike mikemcl...@gmail.com wrote: Hello community, I'm new here, and any help anyone can provide will be greatly appreciated. I am trying to build a set of nested lists, each

[Proto-Scripty] Re: Ajax.updater - after text has been inserted into element

2009-09-02 Thread DJ Mangus
I don't think there is one that fires afterward. If you function#defer a function onsuccess it should have been completed after the defer timeout. On Wed, Sep 2, 2009 at 3:11 PM, Mojito tokyot...@gmail.com wrote: I'm using the Ajax.Updater. I'm looking for the callback that is executed

[Proto-Scripty] Re: execution order in IE

2009-09-03 Thread DJ Mangus
See this article: http://proto-scripty.wikidot.com/prototype:how-to-load-scripts-dynamically On Thu, Sep 3, 2009 at 9:25 AM, JoJo tokyot...@gmail.com wrote: Instead of loading JS in the head, how do I do includes like virtually all other languages? Isn't Scriptaculous loading Effects.js and

[Proto-Scripty] Re: how merge two json objects?

2009-09-11 Thread DJ Mangus
It's explained in the link I gave. On Fri, Sep 11, 2009 at 5:30 PM, Miguel Beltran R. yourpa...@gmail.comwrote: 2009/9/11 DJ Mangus d.man...@gmail.com I've never done this but I'm pretty sure you can use object.extend. http://api.prototypejs.org/language/object.html#extend-class_method

[Proto-Scripty] Re: YSlow's rule JavaScript at the bottom w/Prototype

2009-09-16 Thread DJ Mangus
They do but you'd need to cache each combination of scripts once each. That's a great way to go about it if you require the same scripts on each page, or the landing page requires all of them (and then it'd cache the concat'd and minified version) and you include the lot on each other page no

[Proto-Scripty] Re: newbie - form submit

2009-09-20 Thread DJ Mangus
Never rely on client side validation, that's for convenience for your users, not security.First, make the functionality works (including security) without javascript. Then override the submit button with javascript by observing the submit. In that event code you submit the form via ajax, hide the

[Proto-Scripty] Re: Dynamic test after ajax call

2009-09-21 Thread DJ Mangus
Sounds like your situation is very out of the norm. Usually being able to manipulate the DOM via JS is sufficient except in debugging situations (in which case an extension is fine). Good luck figuring out something different to do. On Mon, Sep 21, 2009 at 9:57 AM, Kumar kumar.k.re...@gmail.com

[Proto-Scripty] Re: Event.pointerX() Different Between IE and FF?

2009-09-24 Thread DJ Mangus
Not sure about the major browsers but just read about iPhone optimiation of pages and viewport is certainly odd in mobile Safari. Sent from my phone so pardon the spelling errors. On Sep 24, 2009, at 6:34 AM, KammylandSoftware kammyl...@gmail.com wrote: Does it perhaps have anything to do

[Proto-Scripty] Re: Setting focus after Ajax.Updater complete?

2009-09-28 Thread DJ Mangus
If the id 'editdescription' is added to the DOM it won't have been processed by the browser OnComplete. You will have to delay the function. Sent from my phone so pardon the spelling errors. On Sep 27, 2009, at 10:59 PM, Steve Marshall ste...@westnet.net.au wrote: Hi all. I'm brand-new to

Re: [Proto-Scripty] Event.element

2010-01-10 Thread DJ Mangus
What is returned is the same thing you'd get if you used $('id'). Chain on .identify to get the Id from a DOM node. On Sunday, January 10, 2010, bill will...@techservsys.com wrote: The docs say: Event.element(event) - Element Returns the DOM element on which the event occurred. But,

Re: [Proto-Scripty] Event.element

2010-01-10 Thread DJ Mangus
Either should work fine. No need for a variable though. It's what makes prototype so nice. Sent from my phone so please pardon any spelling errors. On Jan 10, 2010, at 11:08 AM, bill will...@techservsys.com wrote: DJ Mangus wrote: What is returned is the same thing you'd get if you used

Re: [Proto-Scripty] divide one long table into multiple 40 rows

2010-02-09 Thread DJ Mangus
That really should be handled serverside IMO. Otherwise all the data is downloaded upon initial page call when all you need is one page worth at that point. Sent from my phone so please pardon any spelling errors. On Feb 9, 2010, at 10:20 AM, albert kao albertk...@gmail.com wrote: Instead of

Re: [Proto-Scripty] get a file from intranet server

2010-02-09 Thread DJ Mangus
I'm confused. Are you wanting to call up a local file? Or are you running a webserver on that vista machine? You really should install a webserver on the machine first and then ask in the place where they support your server rather than hereas this question isn't really about prototype. Sent

Re: [Proto-Scripty] Re: get a file from intranet server

2010-02-10 Thread DJ Mangus
. On Feb 10, 2010, at 12:23 PM, albert kao albertk...@gmail.com wrote: On Feb 9, 4:13 pm, DJ Mangus d.man...@gmail.com wrote: I'm confused. Are you wanting to call up a local file? Or are you running a webserver on that vista machine? You really should install a webserver on the machine first

Re: [Proto-Scripty] can Request be used to track navigation clicks asynchronously?

2010-02-16 Thread DJ Mangus
Don't see why not though it'd slow down the user experience a bit (not necessarily a good thing). Have the onclick block, send data to server, server responds, then in the Ajax callback send user to the destination via window.location Note: I haven't done this, it's just an off the top of my

Re: [Proto-Scripty] The Unofficial Wiki

2010-04-08 Thread DJ Mangus
If it becomes easy to contribute to the official page then yes, that's the ideal answer as it's easier to find. If it wasn't for this group, I wouldn't have known about your wiki. On Apr 8, 2010, at 6:23 AM, T.J. Crowder t...@crowdersoftware.com wrote: Hi folks, As many of you know, we've

Re: [Proto-Scripty] Re: Effect.Morph applied to background image

2010-04-11 Thread DJ Mangus
That is all i can think of. Quite heavy handed to have such a transition, but doable. Possibly always have a clone behind the transitioning element and just morph the opacity of the one on top anytime you want to change the background. Btw, the reason morph only effects what it does is that the

Re: [Proto-Scripty] Return From Each Loop

2010-04-14 Thread DJ Mangus
What you probably want is other enumerable methods, such as http://www.prototypejs.org/api/enumerable/any On Apr 13, 2010, at 11:53 AM, sporkit minchuk.j...@gmail.com wrote: I'm trying to validate that at least one checkbox of 4 has been selected. The code seems simple enough to me.

Re: [Proto-Scripty] Another help with $$ needed

2010-04-19 Thread DJ Mangus
What you are looking for is http://api.prototypejs.org/language/enumerable/prototype/invoke/ Sent from my iPad On Apr 19, 2010, at 10:23 PM, Ran Berenfeld berenfeld...@gmail.com wrote: Hello Is there a way to do something like $$(xxx).hide() ? (instead of iteration over the array) i.e