[Proto-Scripty] Re: News Items List

2011-03-16 Thread PartisanEntity
Hi again,

Now this time I cleared the cache before  posting here.

My list looks as follows:

ul
lia href=#Link/a/li
lia href=#Link/a/li
/ul

Using CSS I have removed the list-style-type as well as any indenting.

In Firefox it works.

In IE8 however there is a left indent of at least 10px.

Strangely enough this indent only appears when I link to the .js file
in the head of the document. Without the javascript, there is no
indent in IE8.

Does this indent have something to do with the JavaScript?


On Mar 15, 11:43 am, PartisanEntity partisanent...@gmail.com wrote:
 You guys are going to kill me.

 I cleared the browser cache, and it's working in IE8 too, I'm so sorry
 for wasting your time :)

 On Mar 15, 11:02 am, PartisanEntity partisanent...@gmail.com wrote:

  Sorry that was just a typo from me.

  It is document.observe...

  On Mar 15, 10:49 am, David Behler d.beh...@gmail.com wrote:

   You might wanna try
   document.observe();
   instead of
   document.observer();

   David

   Am 15.03.2011 10:34, schrieb PartisanEntity:

Sorry just to clarify:

Line 3 Char3 is the first line of your function. So it's the line
starting with: document.observer(.

On Mar 15, 10:04 am, PartisanEntitypartisanent...@gmail.com  wrote:
The link is currently behind a firewall so I can't post it. But here
is what IE says:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/
4.0; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR
3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR
3.5.30729; MS-RTC LM 8)
Timestamp: Tue, 15 Mar 2011 09:01:36 UTC

Message: Object doesn't support this property or method
Line: 3
Char: 3
Code: 0
URI:http://www.test.com/_includes/newseffect/slideeffect.js

On Mar 14, 5:46 pm, Walter Lee Daviswa...@wdstudio.com  wrote:

And you also loaded Prototype and Scriptaculous before that, in that  
order, right? Can you post a link? I have IE8 with a debugger enabled 
 
here on a VM, I could see if any errors suggest themselves.
Walter
On Mar 14, 2011, at 12:20 PM, PartisanEntity wrote:
The list is displayed in its entirety without animations.
It's almost as if the JavaScript it being ignored completely in IE8.
I pasted your JavaScript into a file which I called newslist.js.
I linked to it in the head section of my html file like so:
script type=text/javascript src=http://www.test.com/_includes/
newsbox/newslist.js/script
On Mar 14, 3:43 pm, Walter Lee Daviswa...@wdstudio.com  wrote:
No, but please define doesn't work. Does the animation fail, does 
the
text not change...?
Walter
On Mar 14, 2011, at 8:34 AM, PartisanEntity wrote:
Hi Walter,
Thanks so much for this. It is working perfectly.
There is only one issue I am having:
While it works in Firefox and Safari, I tried using IE8 and noticed
that it works on one computer, but not on another.
Do you have any experiences with this script and IE8, anything to
watch out for?
Thanks!
On Mar 12, 5:02 pm, Walter Lee Daviswa...@wdstudio.com  wrote:
Here's a cut-down version of the code generated by my NewsCycle  
plug-
in for Softpress Freeway.
document.observe('dom:loaded',function(){
         var newsSource = $('yourListId');
         var delayBetweenItems = 3;
         var effectSpeed = 0.6;
         var tag =  
newsSource.firstDescendant().tagName.toLowerCase();
         var data =
newsSource.select(tag).invoke('hide').pluck('innerHTML');
         var news = newsSource.down(tag).show();
         var index = 0;
         var newsCycle = function(){
                 index = (++index= data.length ? 0 : index)
                 new Effect.Fade(news,{
                         delay:delayBetweenItems,
                         duration:effectSpeed,
                         afterFinish:function(){
                                 new Effect.BlindDown(news,{
                                         duration:effectSpeed,
                                         beforeStart:function(){
news.update(data[index]);
                                         },
                                         afterFinish:newsCycle
                                 });
                         }
                 });
         };
         newsCycle();
});
You need prototype and scriptaculous effects in the page first,
obviously, and you need to fill in the id of your list. My plug-in
has
extra code to make it list agnostic, so you could simplify this 
a
lot if you knew that your effect was only ever being applied to a
list. You could also use this as written on a DIV with a bunch of 
P
tags in it, or a DIV with a bunch of DIVs in it -- there's no end 
 
to
the 

[Proto-Scripty] i didn't understand a thing about events

2011-03-16 Thread Vecchia Spugna
Hello everyone!

i would like to do script in this way:

Event.observe(window, load, function()
{
  $$('form').each
  (
function(object)
{
  Event.observe(object, submit, preventDoubleClick);
}
  );
});

function PreventDoubleClick(event)
{
  var element = event.element();
  submit_button = element.down(input[type='submit']);  //  This
doesn't work! $(this).down(input[type='submit'] doesn't work!
  .//disable button and reenable it later..
}


So, what i don't understand is why the parameter looses its conception
of DOM under it. I can obtain the CORRECT result doing $
('myform').down(input[type='submit'])

what is the concept i am ignoring??

thank you very much

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: Rails 3.1 - Prototype = WTF?

2011-03-16 Thread Felix
Hi,
  I found this answer(by andrew dupont) in quora to a question about
the prototype library.

Question was
What must Prototype JS do to become the library of choice?Edit
Once Prototype JS was very popular until jQuery was released and
became very popular. What are the things you feel Prototype JS must do
in order to become the library of choice?.


Answer by Andrew Dupont.

I'm the co-maintainer of Prototype. I don't speak for Tobie (my fellow
co-maintainer) or Sam (who created Prototype), but here's what I feel:

In recent years, Prototype has been starved for development resources.
Unlike jQuery, nobody's working on it full-time; I work on it more
than anyone else, but I've got a full-time job as well. On one hand,
we're genuinely out of new areas to tackle and are looking more toward
a reimagining of the existing API than toward adding large new
features; on the other hand, there's a definite lack of polish, and I
hope to address that in subsequent releases.

Where would I improve Prototype? Well, let's start with Keith's list.
About half of it is stuff that we've got planned, whether for a 1.X
version or for 2.0 (anything that affects backward-compatibilty must
wait for 2.0). Some of it is being worked on (like the UI library —
I'm building one for script.aculo.us 2.0). Some of it is a matter of
opinion. Keith and I will have to disagree on the trying to make
JavaScript feel like Ruby thing; the entire point of Prototype is
that JavaScript and Ruby are so close in philosophy that we can borrow
concepts from Ruby without having them feel tacked-on.

And some of it, like the plugin ecosystem, is something we'd love to
fix if we had the resources.

Too often, open-source libraries are pitted against one another as
though they were competitors in a marketplace. I honestly don't care
who has the greatest market share — I care only that Prototype has
enough mindshare to keep it viable (so that it can keep improving
through patches, bug reports, and so on).

So here's my answer: to become the library of choice, we'd probably
have to change so much about ourselves that we'd be unrecognizable.
I'm not interested in doing that. If that means we're a niche library,
so be it — we'll be a niche library with purpose. But do remember that
the niches themselves are quite large.

In terms of market share, jQuery won because it is genuinely good,
easy to learn, and easy to drop into any environment. But market share
is just one way of measuring impact. The Dojo guys are the revered
badasses of the JavaScript community even though Dojo has never been a
dominant toolkit. Dean Edwards has a statue in the JavaScript pantheon
even though none of his toolkits have seen widespread adoption. It's a
big world and there's room for all of us.


You can read more about this question at
http://www.quora.com/What-must-Prototype-JS-do-to-become-the-library-of-choice


Felix

On Mar 15, 9:58 pm, greg g...@reservation-net.com wrote:
 I don't often post here, but I've been using Prototype extensively for
 the last 6 months.  Not a day goes by when I don't say something to
 myself along the lines of Thank God for Prototype.  Perhaps, had I
 started with J-Query, I'd have said the same thing about it - but I
 didn't, and I'd like to continue with Prototype.

 It could very well be the Prototype developers are: bored, busy,
 broke, out of ideas, or any combination.  Maybe instead of just saying
 things like we'd like Prototype to be more popular and do more things
 in less space, and be more relevant, etc, someone should create a wish-
 list page, with a prominent 'Donate Here' button.  I don't work for
 free and don't expect others to either.  (I just checked and
 Prototype's web page does not have a donate button).

 Programmers all like a challenge, so if we as users can come up with
 concrete wishes for Prototype then perhaps the developers will take up
 the challenge.

 And, Thank God for Prototype!

 On Mar 14, 10:34 pm, Jason jwestbr...@gmail.com wrote:







  I agree and would like to see Prototype start returning to the
  forefront as the powerful JS library it is

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Several posts (asynchronous) - could it be an issue?

2011-03-16 Thread DanielMerliMorais
Hello all,

I have a web page to insert student's grades into a DB table. So, this
is what I'm doing:

1 - A table is built dinamically with all the students names and one
input for each other, which will be their grade;
2 - A submit button will call a function which will post all this data
(student's ID and grade) into another page (insert_data.php), which
will insert it into the DB and return a SUCCESS or FAILURE, for each
one;
3 - As I can have a lot of students, the post is timing out (as the
parameters variable is huge), so I'm doing one post for each student,
instead of putting all the data into an array and posting only once.

It works perfectly so far, but here's my question:

As the calls to the second page (insert_data.php) are working like a
asynchronous thread, can this page get confused with the variables
it's receiving? I already did several tests into my test bed (which
were all successful, as I said), but I'd like to be confident that
this approach won't cause any issues in production, when I'll have
much more student's grades to be inserted at the same time.

I'm assuming something like a session is created for each post, which
is making them to be received properly by insert_data.php, but, again,
I just want to receive a final confirmation from anyone that may
possible already worked on it.

Please let me know if I wasn't clear and I can send more details and/
or snippet of the code.

Thanks in advance!

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: i didn't understand a thing about events

2011-03-16 Thread T.J. Crowder
Hi,

Rather than

 var element = event.element();

...try just using `this`, since `this` is guaranteed to be the element
that you assigned the handler to (the form) rather than a subordinate
element (which it may be because of event bubbling). Now, I would
expect `event.element()` on a `submit` event to return the form, but
there's no need for it in this case, just use `this`.

BTW, you can change this:

* * * *
$$('form').each
(
  function(object)
  {
    Event.observe(object, submit, preventDoubleClick);
  }
);
* * * *

to this:

* * * *
$$('form').invoke('observe', 'submit', preventDoubleClick);
* * * *

...and thereby avoid creating a bunch of unnecessary functions (not
that they were likely doing much harm).

HTH,
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

On Mar 15, 10:58 am, Vecchia Spugna vecchiaspu...@gmail.com wrote:
 Hello everyone!

 i would like to do script in this way:

 Event.observe(window, load, function()
 {
   $$('form').each
   (
     function(object)
     {
       Event.observe(object, submit, preventDoubleClick);
     }
   );

 });

 function PreventDoubleClick(event)
 {
   var element = event.element();
   submit_button = element.down(input[type='submit']);  //  This
 doesn't work! $(this).down(input[type='submit'] doesn't work!
   .//disable button and reenable it later..

 }

 So, what i don't understand is why the parameter looses its conception
 of DOM under it. I can obtain the CORRECT result doing $
 ('myform').down(input[type='submit'])

 what is the concept i am ignoring??

 thank you very much

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Rails 3.1 - Prototype = WTF?

2011-03-16 Thread Richard Quadling
On 15 March 2011 18:49, Felix felix1...@gmail.com wrote:
 What must Prototype JS do to become the library of choice?

PrototypeJS _is_ my library of choice.

Job done! Well done PrototypeJS Core-Devs.

And you can quote me on that!

Ha. I wonder how much I'd have to pay so that I could get ...

ProtoypeJS is Richard Quadling's library of choice. Make it yours today!

on the front page.

I've got chocolate and beer. Probably can also get chocolate flavoured
beer if necessary!

Richard.



-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: News Items List

2011-03-16 Thread Walter Lee Davis
Just a hunch, but see if your page is valid at http:// 
validator.w3.org. Also, check to see if you removed padding from the  
UL and the LI and margin from the LI. Although, if it looks correct to  
you without the script, then I'm not sure why that could be it.


Walter

On Mar 16, 2011, at 6:56 AM, PartisanEntity wrote:


Hi again,

Now this time I cleared the cache before  posting here.

My list looks as follows:

ul
lia href=#Link/a/li
lia href=#Link/a/li
/ul

Using CSS I have removed the list-style-type as well as any indenting.

In Firefox it works.

In IE8 however there is a left indent of at least 10px.

Strangely enough this indent only appears when I link to the .js file
in the head of the document. Without the javascript, there is no
indent in IE8.

Does this indent have something to do with the JavaScript?


On Mar 15, 11:43 am, PartisanEntity partisanent...@gmail.com wrote:

You guys are going to kill me.

I cleared the browser cache, and it's working in IE8 too, I'm so  
sorry

for wasting your time :)

On Mar 15, 11:02 am, PartisanEntity partisanent...@gmail.com wrote:


Sorry that was just a typo from me.



It is document.observe...



On Mar 15, 10:49 am, David Behler d.beh...@gmail.com wrote:



You might wanna try
document.observe();
instead of
document.observer();



David



Am 15.03.2011 10:34, schrieb PartisanEntity:



Sorry just to clarify:



Line 3 Char3 is the first line of your function. So it's the line
starting with: document.observer(.


On Mar 15, 10:04 am, PartisanEntitypartisanent...@gmail.com   
wrote:
The link is currently behind a firewall so I can't post it. But  
here

is what IE says:



Webpage error details


User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;  
Trident/

4.0; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR
3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR  
3.0.4506.2152; .NET CLR

3.5.30729; MS-RTC LM 8)
Timestamp: Tue, 15 Mar 2011 09:01:36 UTC



Message: Object doesn't support this property or method
Line: 3
Char: 3
Code: 0
URI:http://www.test.com/_includes/newseffect/slideeffect.js



On Mar 14, 5:46 pm, Walter Lee Daviswa...@wdstudio.com  wrote:


And you also loaded Prototype and Scriptaculous before that,  
in that
order, right? Can you post a link? I have IE8 with a debugger  
enabled

here on a VM, I could see if any errors suggest themselves.
Walter
On Mar 14, 2011, at 12:20 PM, PartisanEntity wrote:

The list is displayed in its entirety without animations.
It's almost as if the JavaScript it being ignored completely  
in IE8.
I pasted your JavaScript into a file which I called  
newslist.js.

I linked to it in the head section of my html file like so:
script type=text/javascript src=http://www.test.com/_includes/
newsbox/newslist.js/script
On Mar 14, 3:43 pm, Walter Lee Daviswa...@wdstudio.com   
wrote:
No, but please define doesn't work. Does the animation fail,  
does the

text not change...?
Walter
On Mar 14, 2011, at 8:34 AM, PartisanEntity wrote:

Hi Walter,
Thanks so much for this. It is working perfectly.
There is only one issue I am having:
While it works in Firefox and Safari, I tried using IE8 and  
noticed

that it works on one computer, but not on another.
Do you have any experiences with this script and IE8,  
anything to

watch out for?
Thanks!
On Mar 12, 5:02 pm, Walter Lee Daviswa...@wdstudio.com   
wrote:
Here's a cut-down version of the code generated by my  
NewsCycle

plug-
in for Softpress Freeway.
document.observe('dom:loaded',function(){
 var newsSource = $('yourListId');
 var delayBetweenItems = 3;
 var effectSpeed = 0.6;
 var tag =
newsSource.firstDescendant().tagName.toLowerCase();
 var data =
newsSource.select(tag).invoke('hide').pluck('innerHTML');
 var news = newsSource.down(tag).show();
 var index = 0;
 var newsCycle = function(){
 index = (++index= data.length ? 0 : index)
 new Effect.Fade(news,{
 delay:delayBetweenItems,
 duration:effectSpeed,
 afterFinish:function(){
 new Effect.BlindDown(news,{
  
duration:effectSpeed,
  
beforeStart:function(){

news.update(data[index]);
 },
  
afterFinish:newsCycle

 });
 }
 });
 };
 newsCycle();
});
You need prototype and scriptaculous effects in the page  
first,
obviously, and you need to fill in the id of your list. My  
plug-in

has
extra code to make it list agnostic, so you could  
simplify this a
lot if you knew that your effect was only ever being  
applied to a
list. You could also use this as written on a DIV with a  
bunch of P
tags in it, or a DIV with a bunch of DIVs in it -- there's  

Re: [Proto-Scripty] Several posts (asynchronous) - could it be an issue?

2011-03-16 Thread Walter Lee Davis


On Mar 15, 2011, at 6:04 PM, DanielMerliMorais wrote:


I'm assuming something like a session is created for each post, which
is making them to be received properly by insert_data.php, but, again,
I just want to receive a final confirmation from anyone that may
possible already worked on it.


It's not a session, it's an HTTP request. Because you've bundled  
together the student ID and the grade in one request, each POST is  
atomic, and will be accepted by the Web server and your application  
server as a coherent unit. This should scale fine. Although I'm  
curious how many such pairs you put into a test page and had the  
request time out. I thought a POST was pretty much limitless -- if  
you're using PHP, there's some settings to tweak in your php.ini to up  
the maximum post size and processing time to heroic levels. I have a  
form where people can upload video files -- multiple video files --  
using PHP. I don't think grades are in the same universe.


Walter

--
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: IE stack overflow

2011-03-16 Thread Phil Petree
Every time that I have had a stack overflow its been because of a
continuous, recursive call (same function gets continually called inside a
loop until there is no more room on the stack to make another call (stack
gets depleted hence the stack overflow)).

On Wed, Mar 16, 2011 at 9:13 AM, Walter Lee Davis wa...@wdstudio.comwrote:

 Which lightbox, and which version of Prototype? This error means that
 you're asking IE to do something (usually) that's part of the extended
 Prototype canon, but you're asking it on an object which has not been
 extended by Prototype yet. Normal JavaScript engines don't need this bit of
 coddling -- adding a method to the prototype of one element adds it to all
 of them. But IE doesn't follow those rules, so each element that you act on
 needs to be passed through a function which explicitly copies all of the
 Prototype.js methods into it before it can be used. The difference between
 your code working and not will be subtle, as in the difference between
 $(element) and element.

 Walter

 On Mar 15, 2011, at 9:33 PM, The Dark Lord wrote:

 ok, well as i said i was not a javascript guru, but i think i may have
 found the issue after going through the IE debugger... it appears that
 lightbox that i'm using is causing the issue with an endless loop or
 something which is causing the stack overflow. and it is the reason
 for the handler not defined... when i got rid of lightbox all the
 issues went away. I don't know enough about javascript to figure out
 how to make it work properly but i am smart enough to get rid of
 something that is broke. So no more lightbox. I can prolly make me a
 simple modal window for my needs... if not, i will just go the old
 fashion way of doing things :(

 anyways, if anyone wants to look into what i found i can post more
 information about such as the lines i found the errors on.

 thanks for your time guys/gals

 --
 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
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=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 unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=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 unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Redrawing Autocomplete Field

2011-03-16 Thread Joe Koston
I finally figured out my issue.

I was being bitten by the fact that evalScripts evals scripts in the local
scope to the prototype object.

This was fine when my script was loaded from the start, but if that script
was drawn to the page via an AJAX call it would get executed in the wrong
scope and all weird things would start happening.

On Tue, Mar 15, 2011 at 5:59 PM, joe t. thooke...@gmail.com wrote:

 When the Autocompleter is initialized, the options are set as such:

 ...
 this.options.minChars = this.options.minChars || 1;
 ...

 Your 0 evaluates as false-ish, so trips over to 1. i'm pretty sure the
 reason for requiring at least 1 character in the lookup string is that
 the result list attempts to highlight the matching string pattern in
 bold, so when that string is empty, it could cause problems. Mostly
 that's a guess, but that line in the Autocompleter.baseInitialize is
 why you can't get a list on empty - it's not actually using your 0.

 As for why it generates a request on the empty string...i believe
 that's being triggered by the onKeyPress handler. It's intended to
 handle key navigation for the INPUT vs. the results list. Since it
 doesn't trap DELETE or BACKSPACE, it simply less their events pass
 through the handling down to this section:
 
 this.changed = true;
 this.hasFocus = true;

 if(this.observer) clearTimeout(this.observer);
 this.observer = setTimeout(this.onObserverEvent.bind(this),
 this.options.frequency*1000);
 

 It tells other methods that the value has changed, has focus, and
 resets a timer to call the next Ajax request. Since you're handling
 empty strings on your server side, you see a successful round-trip
 AJAX request. But Autocompleter doesn't do anything with the result
 per the reason above.

 You'd have to write an override function of some sort, and make sure
 that the empty string doesn't harm other areas of the Autocompleter
 class.

 However, i recommend that you note to your user they can use some
 special character (usually *) to search all, then handle the * on
 the server side.
 -joe t.




 On Mar 15, 12:58 pm, pipplo joe.kos...@gmail.com wrote:
  Ok, I've done some more debug.
 
  The autocomplete text box works still.  But it doesn't seem to work
  with 0 chars.
 
  I can see when the user clicks in the text box a request is generated,
  and a response is generated. I can use the chrome debugger to see that
  the response is as expected.
 
  The AJAX request seems to just not render the HTML when the number of
  chars is 0, even though it does all the work to generate a request and
  parse the response. As soon as I type a character I get the expected
  auto-complete results displayed.  When I backspace back to 0 chars it
  doesn't display anything, but it still does the AJAX request.
 
  There must be a place in prototype.js where there is a decision to
  render the html or not?  I can't seem to find it.  So I'm just looking
  for some hints on why that wouldn't happen sometimes..
 
  On Mar 14, 11:27 am, pipplo joe.kos...@gmail.com wrote:
 
 
 
 
 
 
 
   I have a weird bug that I'm having trouble debugging. I am using Rails
   but I think the issue is in the javascript handling somewhere.
 
   I have a div with a form and autocomplete
 
   div id=form
form info
   autocomplete box
/form
   /div
 
   I have the options set so that when the user clicks in the auto-
   complete they get an initial list (minChars = 0)
 
   When the user types a user name in the autocomplete and selects one of
   the drop down options I generate a request via Ajax and render the
   form again without the autocomplete. The user can then click 'remove'
   to remove the user info and re-draw the autocomplete box.
 
   After the re-draw the minChars = 0 doesn't work.  Whenever I click in
   the box I see a request generated to my controller, and I return the
   correct information but it doesn't get rendered into HTML and I dont
   see a drop down.
 
   If the user types a letter or name then the dropdown lits does show
   up, but the initial ajax request never gets reflected.
 
   I assume there is some state variable that thinks the text box hasn't
   changed value or something which is preventing actually rendering the
   HTML returned by Rails.
 
   I hope that makes sense.  Any ideas?
 
   P.S. My current workaround is to just hide the autocomplete field and
   not render it empty.  This works but won't be usable in other parts of
   my site.

 --
 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
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us 

[Proto-Scripty] Re: Several posts (asynchronous) - could it be an issue?

2011-03-16 Thread DanielMerliMorais
Thanks a lot, this is exaclty what I was expecting.

Just answering your question, I said student's ID and grade just to
simplify the question, but actually I have student's ID, a grade for
each question (1 - N questions) and a comment (text) for each
question. As an example, if I have a 5 questions test, and 100
students, I would need to post 100*(5 (grades) + 5 (comments) + 1
(student's ID)) variables.

Thanks again!

On 16 mar, 10:01, Walter Lee Davis wa...@wdstudio.com wrote:
 On Mar 15, 2011, at 6:04 PM, DanielMerliMorais wrote:

  I'm assuming something like a session is created for each post, which
  is making them to be received properly by insert_data.php, but, again,
  I just want to receive a final confirmation from anyone that may
  possible already worked on it.

 It's not a session, it's an HTTP request. Because you've bundled  
 together the student ID and the grade in one request, each POST is  
 atomic, and will be accepted by the Web server and your application  
 server as a coherent unit. This should scale fine. Although I'm  
 curious how many such pairs you put into a test page and had the  
 request time out. I thought a POST was pretty much limitless -- if  
 you're using PHP, there's some settings to tweak in your php.ini to up  
 the maximum post size and processing time to heroic levels. I have a  
 form where people can upload video files -- multiple video files --  
 using PHP. I don't think grades are in the same universe.

 Walter

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: Rails 3.1 - Prototype = WTF?

2011-03-16 Thread joe t.
Excellent. Thanks for providing that quote.
j

On Mar 15, 2:49 pm, Felix felix1...@gmail.com wrote:
 Hi,
   I found this answer(by andrew dupont) in quora to a question about
 the prototype library.

 Question was
 What must Prototype JS do to become the library of choice?Edit
 Once Prototype JS was very popular until jQuery was released and
 became very popular. What are the things you feel Prototype JS must do
 in order to become the library of choice?.

 Answer by Andrew Dupont.

 I'm the co-maintainer of Prototype. I don't speak for Tobie (my fellow
 co-maintainer) or Sam (who created Prototype), but here's what I feel:

 In recent years, Prototype has been starved for development resources.
 Unlike jQuery, nobody's working on it full-time; I work on it more
 than anyone else, but I've got a full-time job as well. On one hand,
 we're genuinely out of new areas to tackle and are looking more toward
 a reimagining of the existing API than toward adding large new
 features; on the other hand, there's a definite lack of polish, and I
 hope to address that in subsequent releases.

 Where would I improve Prototype? Well, let's start with Keith's list.
 About half of it is stuff that we've got planned, whether for a 1.X
 version or for 2.0 (anything that affects backward-compatibilty must
 wait for 2.0). Some of it is being worked on (like the UI library —
 I'm building one for script.aculo.us 2.0). Some of it is a matter of
 opinion. Keith and I will have to disagree on the trying to make
 JavaScript feel like Ruby thing; the entire point of Prototype is
 that JavaScript and Ruby are so close in philosophy that we can borrow
 concepts from Ruby without having them feel tacked-on.

 And some of it, like the plugin ecosystem, is something we'd love to
 fix if we had the resources.

 Too often, open-source libraries are pitted against one another as
 though they were competitors in a marketplace. I honestly don't care
 who has the greatest market share — I care only that Prototype has
 enough mindshare to keep it viable (so that it can keep improving
 through patches, bug reports, and so on).

 So here's my answer: to become the library of choice, we'd probably
 have to change so much about ourselves that we'd be unrecognizable.
 I'm not interested in doing that. If that means we're a niche library,
 so be it — we'll be a niche library with purpose. But do remember that
 the niches themselves are quite large.

 In terms of market share, jQuery won because it is genuinely good,
 easy to learn, and easy to drop into any environment. But market share
 is just one way of measuring impact. The Dojo guys are the revered
 badasses of the JavaScript community even though Dojo has never been a
 dominant toolkit. Dean Edwards has a statue in the JavaScript pantheon
 even though none of his toolkits have seen widespread adoption. It's a
 big world and there's room for all of us.

 You can read more about this question 
 athttp://www.quora.com/What-must-Prototype-JS-do-to-become-the-library-...

 Felix

 On Mar 15, 9:58 pm, greg g...@reservation-net.com wrote:







  I don't often post here, but I've been using Prototype extensively for
  the last 6 months.  Not a day goes by when I don't say something to
  myself along the lines of Thank God for Prototype.  Perhaps, had I
  started with J-Query, I'd have said the same thing about it - but I
  didn't, and I'd like to continue with Prototype.

  It could very well be the Prototype developers are: bored, busy,
  broke, out of ideas, or any combination.  Maybe instead of just saying
  things like we'd like Prototype to be more popular and do more things
  in less space, and be more relevant, etc, someone should create a wish-
  list page, with a prominent 'Donate Here' button.  I don't work for
  free and don't expect others to either.  (I just checked and
  Prototype's web page does not have a donate button).

  Programmers all like a challenge, so if we as users can come up with
  concrete wishes for Prototype then perhaps the developers will take up
  the challenge.

  And, Thank God for Prototype!

  On Mar 14, 10:34 pm, Jason jwestbr...@gmail.com wrote:

   I agree and would like to see Prototype start returning to the
   forefront as the powerful JS library it is

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.