[Proto-Scripty] Hiding select option by value

2009-03-09 Thread lt
Hi there, Have a quick question - what is the most simple way to go about "hiding" (or setting css display property to "none") a specific select dropdown option by value? For instance, say I have this: One Two ... With the Prototype library, how can I modify the code below to "hide" option

[Proto-Scripty] Re: press enter and go to next field visible

2009-03-09 Thread Miguel Beltran R.
2009/3/9 RobG > > > > On Mar 10, 10:20 am, "Miguel Beltran R." wrote: > > Hi list > > > > How can do it when I press automatic change to next field visible? the > field > > can be input=text or input=select. > > Use the tab key, it navitates through visible form controls by default > - no script

[Proto-Scripty] Re: Opinions appreciated on approach to Getters and Setters.

2009-03-09 Thread kangax
On Mar 9, 9:50 am, webbear1000 wrote: > I'm interested in your opinions on how I'm handling getters and > setters in classes. Can you see any problems with my approach and what > trouble might I be getting myself into? > > The huge body of my programming work has been with ASP.NET in VB and > C#.

[Proto-Scripty] Re: press enter and go to next field visible

2009-03-09 Thread RobG
On Mar 10, 10:20 am, "Miguel Beltran R." wrote: > Hi list > > How can do it when I press automatic change to next field visible? the field > can be input=text or input=select. Use the tab key, it navitates through visible form controls by default - no script required. -- Rob --~--~-~

[Proto-Scripty] press enter and go to next field visible

2009-03-09 Thread Miguel Beltran R.
Hi list How can do it when I press automatic change to next field visible? the field can be input=text or input=select. I have Ejercicio Seleciona una opcion 2008 (Saldo $1000.00) Proyecto Material

[Proto-Scripty] Re: I can't show a Dialog.confirm on the unload event - Please help!

2009-03-09 Thread Tobie Langel
There's another, less bullet-proof solution, which involves catching and stopping all click (an possibly keypress) events on links. That would allow for a custom dialog. You could always fallback on a regular alert for page refreshes and the like. Best, Tobie On Mar 9, 9:39 pm, Quleczka wrot

[Proto-Scripty] Re: $$ failing in FF3.1b3

2009-03-09 Thread kangax
On Mar 9, 6:57 am, Jim Higson wrote: > On Friday 06 March 2009 15:26:49 kangax wrote: [...] > > It's possible that we'll introduce a custom `hasOwnProperty` in later > > revisions. > > Makes sense. > if( !hasOwnProperty ) > hasOwnProperty = function hasOwnProperty(){ ... }; I was thinking of

[Proto-Scripty] Re: I can't show a Dialog.confirm on the unload event - Please help!

2009-03-09 Thread Quleczka
My first thought was gmail scenario as well :) Even google use just confirmation dialog...I've never seen any other type - so I guess you have to live with it ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Proto

[Proto-Scripty] Editing Multiple Fields Simultaneously with InPlaceEditor

2009-03-09 Thread Darryl
Hi, I am looking to edit multiple fields simultaneously with the inplace editor, I've only seen this accomplished on Basecamp so far and I'm not entirely sure how's its done. Have spent a good hour Googling for a tutorial on it, but can't find anything. Anyone know of one or is anyone able to poi

[Proto-Scripty] Re: forms - serialize and more

2009-03-09 Thread Quleczka
Hi, First of all I'm not prototype expert, rather newbie ;) 1) why do you use onsubmit="validatethis();"> if you can use $ ('formlinks').observe('submit',validatethis); 2) you don't have to set asynchronous:true - it's default value 3) most common is parameters: $('formlinks').serialize(tru

[Proto-Scripty] Re: I can't show a Dialog.confirm on the unload event - Please help!

2009-03-09 Thread Radha Spencer
Thank you so much for your response T.J. I emailed my work friends the same question. It hit me yesterday. My friend was like why don't you create your own window. Then I realized that in showing and hiding divs we're just manipulating the dom and that like you said the browser doesn't know to s

[Proto-Scripty] Re: forms - serialize and more

2009-03-09 Thread Bhudda Ben
as additional info, I should mention: there are multiple forms - tho with much different names jQuery is also loaded which at first gave me conflicts, but Ajax.Updater, at least, working now the form giving me problem is itself loaded via Ajax.Updater - along with (using eval) the script 'valid

[Proto-Scripty] forms - serialize and more

2009-03-09 Thread Bhudda Ben
Hi I have a rather large complicated form that changes considerably based on database content and user interaction - therefore, I said to myself, I need to serialize ?? The whole is I wish to serialize form elements, pass them to php (Admin/editmylinks2.php) - which would update database (worki

[Proto-Scripty] Autocompleter.DB

2009-03-09 Thread Namotco
I want to create an autocompleter that uses HTML database storage. What I'm intending to it modify Autocompleter.Local. My problem is that I'm not sure how to fit these 2 pieces of code together: >From Autocompleter: getUpdatedChoices: function() { this.updateChoices(this.options.selector(

[Proto-Scripty] Re: Post Deleted

2009-03-09 Thread Bhudda Ben
OK, sorry I found that I had posted to a different group on linkedin Please forgive erroneous post - will be back for more if responses from that group do not fix my prob... Ben On Mar 9, 9:07 am, Bhudda Ben wrote: > well the post you indicated was a former one.  I had posted a question > abo

[Proto-Scripty] Re: comparing arrays of checkboxes

2009-03-09 Thread Walter Lee Davis
They must have unique IDs, or the page isn't valid and the code has no chance at all of working (unless you need the current property of the last one such). When coding checkboxes, try this: You don't have to use this format, I just find it easy. Now you can get your collection of ch

[Proto-Scripty] Re: Decimal places

2009-03-09 Thread Bob
reply thanks that worked I had to remember to add the quotes around my response to make it a string. I'll also keep the calulation in mind if I have any issues, so far all math is done in external programs and sent back as a response. On Mar 5, 8:15 pm, RobG wrote: > On Mar 5, 7:50 am, Bob wrot

[Proto-Scripty] comparing arrays of checkboxes

2009-03-09 Thread Bob
I am trying to determine if a series of checkboxes have been changed on the screen. They all have the same ID of CODE, and different values. the list is dynamic based on what was passed in to build the screen. I have also setup a hidden div to store the inital valuse of these checkboxes with and

[Proto-Scripty] Opinions appreciated on approach to Getters and Setters.

2009-03-09 Thread webbear1000
I'm interested in your opinions on how I'm handling getters and setters in classes. Can you see any problems with my approach and what trouble might I be getting myself into? The huge body of my programming work has been with ASP.NET in VB and C#. So I'm used to classic OOP rather than prototype

[Proto-Scripty] Re: How to correct the following code?

2009-03-09 Thread SamuelXiao
Sorry for my unclear explanation, the following is all my JavaScript code, // script01.js // obj = new Object(); obj.f1 = eventHandler; window.onload = obj.f1; window.onunload = function(){}; function eventHandler(){ postUpdater(); dynamicEdit(); deleteAlert(); v

[Proto-Scripty] Re: Post Deleted

2009-03-09 Thread Bhudda Ben
well the post you indicated was a former one. I had posted a question about forms on Wednesday, had at least three responses by Friday and they were gone on Saturday. POSSIBLY, I posted my question somewhere else - some other prototype group - but I don't think so since this is the only group I

[Proto-Scripty] Re: Is this a bug in select()'s CSS evaluation, or am I misunderstandig something?

2009-03-09 Thread T.J. Crowder
> With :self I could do: > > $(x).select(':self > .mixedcontent').each(...); I don't have anything against ":self", but I don't see why $(x).select ("> .foo") shouldn't be legal syntax. > Right now this is the shortest I came up with, and it's not as concise > as I'm used to with Prototype:

[Proto-Scripty] Re: Class.create and klass() how do you use it folks?

2009-03-09 Thread dzw!
Thank You guys for so much help, it saved me heaps of google time:) I got much deeper insight how things work in js now. "This is just how ECMAScript is designed - expression on a right hand side of an assignment is not aware of its left hand side "context". " - that already became tattoo in my b

[Proto-Scripty] Problem loading large scripts in Safari

2009-03-09 Thread lgel
Hi all, I have a problem using Ajax.Updater in Safari 3.2. Whenever the response contains a large script tag (over 16k of JSON data) it's not evaluated. After some debugging I've find out that "extractScripts" doesn't find the big script tag for some reason. Currently I wrote a patch that just use

[Proto-Scripty] Re: $$ failing in FF3.1b3

2009-03-09 Thread Jim Higson
On Friday 06 March 2009 15:26:49 kangax wrote: > On Mar 6, 5:49 am, Jim Higson wrote: > > On Thursday 05 March 2009 23:22:26 Tobie Langel wrote: > > > Hi, > > > > > > Extending Object.prototype is regarded as a Bad Thing[1]. > > > > Does Prototype state anywhere that it doesn't work if Object.pro

[Proto-Scripty] support for http basic auth in AJAX requests

2009-03-09 Thread adevadeh
Hello, We are building a RESTful web client client in JS to use with our new web API. We would like to use http basic auth but it seems that Prototype does not support this out of the box. The strange thing is, this bug was raised 2 years ago in Trac, and was labeled FIXED. http://dev.rubyonrail

[Proto-Scripty] Re: How to correct the following code?

2009-03-09 Thread ColinFine
On Mar 6, 5:30 pm, SamuelXiao wrote: > Hi, David, it seems that periodicalupdater send request first, > breaking down the preview code > setting new Ajax.Request.  And the object is no longer refering to the > gotopreview function. > Because the firebug console returns the link that the > perio

[Proto-Scripty] Re: Is this a bug in select()'s CSS evaluation, or am I misunderstandig something?

2009-03-09 Thread Marc Liyanage
On 09.03.2009, at 01:44, Tobie Langel wrote: > We'll be shifting to Sizzle pretty soon, which afaik allows (or could > easily be modified to allow) both behaviours. > > Maybe we can make this opt-in for an upcoming release. That would be great, I can see both use cases. I also see that diffe

[Proto-Scripty] Re: Is this a bug in select()'s CSS evaluation, or am I misunderstandig something?

2009-03-09 Thread T.J. Crowder
Hi, > I realize that, but do you all think that this is the expected > behavior? Yes. To me, as Maarten pointed out, this: $('foo').select('div.div_a > span.span_a') is equivalent to this CSS selector: #foo div.div_a > span.span_a which says to select all "span_a" spans that are dir