[Proto-Scripty] Re: Ajax.Autocomplete Questions

2008-10-14 Thread ericindc

I modified interface.php so that no additional URL parameter is
required.  The script has a require statement to pull in a DB access
class and the code necessary to query the database and print the
unordered list.  I'm still seeing the same behavior.

Hopefully firebug will shed some light once it's installed.

On Oct 8, 4:24 pm, Walter Lee Davis [EMAIL PROTECTED] wrote:
 Once you have Firebug there, you will be able to see exactly what is  
 going on. If you could post a link, there are at any given time at  
 least N*100 people on this list with it alive and active, and you  
 might get your answer a little sooner.

 It's odd that you aren't seeing any search attempt until you press a  
 non-character button. By this do you mean a spacebar or a control key  
 or what?

 Have you added any of the options like the number of characters  
 before attempting a match, or anything out of the ordinary like that?  
 Please remind me what your call to Autocompleter looks like.

 Also, what server environment and browser are you seeing this in?  
 Scripty is not at all picky about server, naturally, but I have seen  
 cases where session handling was so greedy that Ajax stuff just  
 wouldn't work correctly.

 Walter

 On Oct 8, 2008, at 3:06 PM, ericindc wrote:





  Walter,

  I had given up on this and switched to jQuery's version of
  autocompleter, but seeing how I hate jQuery I'm back at it again.  I'm
  working with my SAs to get Firefox/Firebug installed to take a peak
  behind the scenes.

  I just noticed that hitting any non-character button also seems to
  trigger the correct action.  So for instance, I type in Ja and my
  indicator flashes up but no results are displayed.  If I hit the shift
  key once, the correct results for Ja are shown.

  Also, I removed theautocomplete.

  On Sep 29, 11:29 am, Walter Lee Davis [EMAIL PROTECTED] wrote:
  I meant that if you were to validate your code, having
 autocomplete=false in the form element would cause it to fail.

  Scripty magically adds the behavior using JavaScript, which is then
  valid code.

  Many many things about Prototype (and by extension, Scripty) rely on
  your code being squeaky-clean and valid. I am not saying that is the
  root of your problem here, just that you should make every attempt to
  fix the things that keep a page from validating before calling bug
  on anything Prototype-based.

  Walter

  On Sep 29, 2008, at 10:07 AM, ericindc wrote:

  One other thing, I don't see mention of the invalid attribute in the
  documentation.  Can you point me in the right direction...

  On Sep 26, 12:53 pm, Walter Lee Davis [EMAIL PROTECTED] wrote:
  You don't say if you're having any problems with this, but you can
  remove theautocomplete(invalid) attribute -- Scripty adds that
  behavior automagically. Otherwise, this looks okay from the calling
  side.

  If your return includes anything besides a bare list (and these
  strong tags count, I believe) then you might see failure from  
  there.
  You're returning a UL, but it's being treated as a data store more
  than a presentational element. I see what you're trying to  
  accomplish
  here, but you need to add that style using another means. There  
  is a
  hook event that happens after the autocompleter has refreshed its
  display. Try patching into that to find and replace the search text
  within the result list with a 'stronged' version of itself.

  Walter

  On Sep 26, 2008, at 12:03 PM, ericindc wrote:

  Thanks Walter, that cleared things up.

  Here is a link to the HTML that contains the new  
  Ajax.Autocompleter
  code as well as my input field and response div.  The PHP script
  prints a string of the following format:

  [ul]
     [li id=1234][strong]Perk[/strong]ins, Justin[/li]
     [li id=5678][strong]Perk[/strong]ins, Tim[/li]
  [/ul]

 http://pastie.org/279871

  On Sep 26, 11:18 am, Walter Lee Davis [EMAIL PROTECTED] wrote:
  When the Autocompleter says returns, it means returns in the  
  same
  way that when you request a page from a Web server, the server
  returns that page. It's a HTTP return, not a PHP return.

  A function (in PHP or any language) may return a string or other
  variable. But that string won't go anywhere outside the  
  application
  server (won't be sent to the browser) unless you print() or  
  echo()
  it.

  Walter

  On Sep 25, 2008, at 8:16 PM, ericindc wrote:

  The part I was confused on is that my PHP code
  doesn't actually return the string containing the unordered  
  list,
  but
  rather prints it.- Hide quoted text -

  - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 

[Proto-Scripty] Re: Ajax.Autocomplete Questions

2008-10-08 Thread ericindc

Walter,

I had given up on this and switched to jQuery's version of
autocompleter, but seeing how I hate jQuery I'm back at it again.  I'm
working with my SAs to get Firefox/Firebug installed to take a peak
behind the scenes.

I just noticed that hitting any non-character button also seems to
trigger the correct action.  So for instance, I type in Ja and my
indicator flashes up but no results are displayed.  If I hit the shift
key once, the correct results for Ja are shown.

Also, I removed the autocomplete.

On Sep 29, 11:29 am, Walter Lee Davis [EMAIL PROTECTED] wrote:
 I meant that if you were to validate your code, having  
 autocomplete=false in the form element would cause it to fail.

 Scripty magically adds the behavior using JavaScript, which is then  
 valid code.

 Many many things about Prototype (and by extension, Scripty) rely on  
 your code being squeaky-clean and valid. I am not saying that is the  
 root of your problem here, just that you should make every attempt to  
 fix the things that keep a page from validating before calling bug  
 on anything Prototype-based.

 Walter

 On Sep 29, 2008, at 10:07 AM, ericindc wrote:





  One other thing, I don't see mention of the invalid attribute in the
  documentation.  Can you point me in the right direction...

  On Sep 26, 12:53 pm, Walter Lee Davis [EMAIL PROTECTED] wrote:
  You don't say if you're having any problems with this, but you can
  remove the autocomplete (invalid) attribute -- Scripty adds that
  behavior automagically. Otherwise, this looks okay from the calling
  side.

  If your return includes anything besides a bare list (and these
  strong tags count, I believe) then you might see failure from there.
  You're returning a UL, but it's being treated as a data store more
  than a presentational element. I see what you're trying to accomplish
  here, but you need to add that style using another means. There is a
  hook event that happens after the autocompleter has refreshed its
  display. Try patching into that to find and replace the search text
  within the result list with a 'stronged' version of itself.

  Walter

  On Sep 26, 2008, at 12:03 PM, ericindc wrote:

  Thanks Walter, that cleared things up.

  Here is a link to the HTML that contains the new Ajax.Autocompleter
  code as well as my input field and response div.  The PHP script
  prints a string of the following format:

  [ul]
     [li id=1234][strong]Perk[/strong]ins, Justin[/li]
     [li id=5678][strong]Perk[/strong]ins, Tim[/li]
  [/ul]

 http://pastie.org/279871

  On Sep 26, 11:18 am, Walter Lee Davis [EMAIL PROTECTED] wrote:
  When the Autocompleter says returns, it means returns in the same
  way that when you request a page from a Web server, the server
  returns that page. It's a HTTP return, not a PHP return.

  A function (in PHP or any language) may return a string or other
  variable. But that string won't go anywhere outside the application
  server (won't be sent to the browser) unless you print() or echo()
  it.

  Walter

  On Sep 25, 2008, at 8:16 PM, ericindc wrote:

  The part I was confused on is that my PHP code
  doesn't actually return the string containing the unordered list,
  but
  rather prints it.- Hide quoted text -

  - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Ajax.Autocomplete Questions

2008-09-29 Thread ericindc

Unfortunately that doesn't seem to be the issue.  I removed the line
of code adding in the strong tab, but am still seeing the failed
autocompleter on first attempt.  I typed in Ja and got nothing.
Jam and I get the corresponding results.  Back to Ja (by just
hitting backspace) and I get the corresponding results.

On Sep 26, 12:53 pm, Walter Lee Davis [EMAIL PROTECTED] wrote:
 You don't say if you're having any problems with this, but you can  
 remove the autocomplete (invalid) attribute -- Scripty adds that  
 behavior automagically. Otherwise, this looks okay from the calling  
 side.

 If your return includes anything besides a bare list (and these  
 strong tags count, I believe) then you might see failure from there.  
 You're returning a UL, but it's being treated as a data store more  
 than a presentational element. I see what you're trying to accomplish  
 here, but you need to add that style using another means. There is a  
 hook event that happens after the autocompleter has refreshed its  
 display. Try patching into that to find and replace the search text  
 within the result list with a 'stronged' version of itself.

 Walter

 On Sep 26, 2008, at 12:03 PM, ericindc wrote:





  Thanks Walter, that cleared things up.

  Here is a link to the HTML that contains the new Ajax.Autocompleter
  code as well as my input field and response div.  The PHP script
  prints a string of the following format:

  [ul]
     [li id=1234][strong]Perk[/strong]ins, Justin[/li]
     [li id=5678][strong]Perk[/strong]ins, Tim[/li]
  [/ul]

 http://pastie.org/279871

  On Sep 26, 11:18 am, Walter Lee Davis [EMAIL PROTECTED] wrote:
  When the Autocompleter says returns, it means returns in the same
  way that when you request a page from a Web server, the server
  returns that page. It's a HTTP return, not a PHP return.

  A function (in PHP or any language) may return a string or other
  variable. But that string won't go anywhere outside the application
  server (won't be sent to the browser) unless you print() or echo()  
  it.

  Walter

  On Sep 25, 2008, at 8:16 PM, ericindc wrote:

  The part I was confused on is that my PHP code
  doesn't actually return the string containing the unordered list,  
  but
  rather prints it.- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Ajax.Autocomplete Questions

2008-09-29 Thread Walter Lee Davis

What do you see in Firebug? Look at the POST being sent out, and the  
reply to that request. Is there a difference between what you see  
coming back the first time and the two subsequent replies?

Walter

On Sep 29, 2008, at 9:53 AM, ericindc wrote:


 Unfortunately that doesn't seem to be the issue.  I removed the line
 of code adding in the strong tab, but am still seeing the failed
 autocompleter on first attempt.  I typed in Ja and got nothing.
 Jam and I get the corresponding results.  Back to Ja (by just
 hitting backspace) and I get the corresponding results.



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Ajax.Autocomplete Questions

2008-09-29 Thread Walter Lee Davis

I meant that if you were to validate your code, having  
autocomplete=false in the form element would cause it to fail.

Scripty magically adds the behavior using JavaScript, which is then  
valid code.

Many many things about Prototype (and by extension, Scripty) rely on  
your code being squeaky-clean and valid. I am not saying that is the  
root of your problem here, just that you should make every attempt to  
fix the things that keep a page from validating before calling bug  
on anything Prototype-based.

Walter

On Sep 29, 2008, at 10:07 AM, ericindc wrote:


 One other thing, I don't see mention of the invalid attribute in the
 documentation.  Can you point me in the right direction...

 On Sep 26, 12:53 pm, Walter Lee Davis [EMAIL PROTECTED] wrote:
 You don't say if you're having any problems with this, but you can
 remove the autocomplete (invalid) attribute -- Scripty adds that
 behavior automagically. Otherwise, this looks okay from the calling
 side.

 If your return includes anything besides a bare list (and these
 strong tags count, I believe) then you might see failure from there.
 You're returning a UL, but it's being treated as a data store more
 than a presentational element. I see what you're trying to accomplish
 here, but you need to add that style using another means. There is a
 hook event that happens after the autocompleter has refreshed its
 display. Try patching into that to find and replace the search text
 within the result list with a 'stronged' version of itself.

 Walter

 On Sep 26, 2008, at 12:03 PM, ericindc wrote:





 Thanks Walter, that cleared things up.

 Here is a link to the HTML that contains the new Ajax.Autocompleter
 code as well as my input field and response div.  The PHP script
 prints a string of the following format:

 [ul]
[li id=1234][strong]Perk[/strong]ins, Justin[/li]
[li id=5678][strong]Perk[/strong]ins, Tim[/li]
 [/ul]

 http://pastie.org/279871

 On Sep 26, 11:18 am, Walter Lee Davis [EMAIL PROTECTED] wrote:
 When the Autocompleter says returns, it means returns in the same
 way that when you request a page from a Web server, the server
 returns that page. It's a HTTP return, not a PHP return.

 A function (in PHP or any language) may return a string or other
 variable. But that string won't go anywhere outside the application
 server (won't be sent to the browser) unless you print() or echo()
 it.

 Walter

 On Sep 25, 2008, at 8:16 PM, ericindc wrote:

 The part I was confused on is that my PHP code
 doesn't actually return the string containing the unordered list,
 but
 rather prints it.- Hide quoted text -

 - Show quoted text -- Hide quoted text -

 - Show quoted text -
 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Ajax.Autocomplete Questions

2008-09-26 Thread Walter Lee Davis

When the Autocompleter says returns, it means returns in the same  
way that when you request a page from a Web server, the server  
returns that page. It's a HTTP return, not a PHP return.

A function (in PHP or any language) may return a string or other  
variable. But that string won't go anywhere outside the application  
server (won't be sent to the browser) unless you print() or echo() it.

Walter

On Sep 25, 2008, at 8:16 PM, ericindc wrote:

 The part I was confused on is that my PHP code
 doesn't actually return the string containing the unordered list, but
 rather prints it.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Ajax.Autocomplete Questions

2008-09-26 Thread ericindc

Thanks Walter, that cleared things up.

Here is a link to the HTML that contains the new Ajax.Autocompleter
code as well as my input field and response div.  The PHP script
prints a string of the following format:

[ul]
   [li id=1234][strong]Perk[/strong]ins, Justin[/li]
   [li id=5678][strong]Perk[/strong]ins, Tim[/li]
[/ul]

http://pastie.org/279871

On Sep 26, 11:18 am, Walter Lee Davis [EMAIL PROTECTED] wrote:
 When the Autocompleter says returns, it means returns in the same  
 way that when you request a page from a Web server, the server  
 returns that page. It's a HTTP return, not a PHP return.

 A function (in PHP or any language) may return a string or other  
 variable. But that string won't go anywhere outside the application  
 server (won't be sent to the browser) unless you print() or echo() it.

 Walter

 On Sep 25, 2008, at 8:16 PM, ericindc wrote:



  The part I was confused on is that my PHP code
  doesn't actually return the string containing the unordered list, but
  rather prints it.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Ajax.Autocomplete Questions

2008-09-25 Thread Justin Perkins

On Thu, Sep 25, 2008 at 2:36 PM, ericindc [EMAIL PROTECTED] wrote:
 First, in the online Ajax.Autocompleter document's Server Return
 section, it states that the server must return an unordered list.
 So, in my server side PHP code I literally return a string containing
 the unordered list.

Autocompleter expects the following:

ul
  lisome item/li
  lisome other item/li
  ...
/ul

It also expects a div to exist on the page with the ID that you pass
as the second argument when you are instantiating the autocompleter.


 Second, I'm having trouble getting my autocomplete code to work
 properly in Netscape 7, even though the exact same code works just
 fine in IE 6.  Are there any known bugs in Scriptaculous that could be
 causing this to fail.

Not sure about that. I know it works fine in IE6/7, Firefox 2/3,
Safari, Opera, Camino, but have never tested nor used NN7.

 Third, I've noticed in that typing in my input fast causes the
 autocomplete to attempt running but fail.  I see my indicator image
 flash on and then off, but no results are returned.

I've never seen behavior like that. I just tried and it had no
problems returning results that matched what I typed, regardless of
how fast I typed those two characters.

Can you link to a demo page exhibiting these bugs and also let us know
what browser/version you are experiencing the problems in?

-justin

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---