[cells-devel] OpenAIR: Doesn't work for me any more ...
Ken Tilton
kennytilton at optonline.net
Fri Apr 11 16:28:53 UTC 2008
Frank Goenninger wrote:
> Found something:
>
> Am 11.04.2008 um 17:53 schrieb Frank Goenninger:
>
>> +function send_text (obj, e) {
>> var request = {};
>> switch(e.type) {
>> case "keyup":
>> @@ -29,8 +38,11 @@ $(document).ready(function(){
>> // $(":input").keyup(function(e) {
>> // send(this, e);
>> // });
>> - $(":input").change(function(e) {
>> - send(this, e);
>> + $(":input[type='text'").change(function(e) {
>> + send_text(this, e);
>> + });
>> + $(":input[type='checkbox']").change(function(e) {
>> + send_checkbox(this, e);
>> });
>> });
>>
>> Oh - now I see the potential problem: These "//" ... I will test...
>
>
> And right there it is:
Woo-hoo!
>
> $(document).ready(function(){
> // $(":input").keyup(function(e) {
> // send(this, e);
> // });
> $(":input[type='text']").keyup(function(e) {
> send_text(this, e);
> });
> $(":input[type='checkbox']").change(function(e) {
> send_checkbox(this, e);
> });
> });
>
> Two things:
>
> 1.) I had to change the line
>
> $(":input[type='text']").keyup(function(e) {
>
> the "]" was missing after 'text' ...
>
> 2.) I had to change the event type to "keyup" for the text input in
> order to really get every key stroke sent over to the server. That's
> the behaviour I am used to from using Celtk and Cello...
Oh, cool, I'll try that, makes for great demo! But the behavior you
observed might derive from the spec I gave Andy, shown atop the
example.lisp file. The salient part:
";; Oh, and the input field is also a pop-up of the query history (which
;; would not make sense if each keystroke was treated as a new query."
ie, it would be a pretty big pop-up if each keystroke was a new query.
(I am just guessing at Franz's rationale.)
kt
More information about the cells-devel
mailing list