<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: AJAX Suggestions - a new JavaScript library for you</title>
	<atom:link href="http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/</link>
	<description>Web development and Internet trends</description>
	<pubDate>Fri, 05 Dec 2008 11:43:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Aldo Zvala</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-481527</link>
		<dc:creator>Aldo Zvala</dc:creator>
		<pubDate>Tue, 02 Dec 2008 21:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-481527</guid>
		<description>Thanks Robert, as I dont know nothing about regex, can please somebody tellme how to tweak this line in order to accept the "http://www.mydomain.com/" suffix.

var url = this.currentElm.className.replace(/.*url-([\w\/\?\.-]+).*/, "$1");

Thanks in advance!

=)</description>
		<content:encoded><![CDATA[<p>Thanks Robert, as I dont know nothing about regex, can please somebody tellme how to tweak this line in order to accept the &#8220;http://www.mydomain.com/&#8221; suffix.</p>
<p>var <acronym title="Uniform Resource Locator">URL</acronym> = this.currentElm.className.replace(/.*<acronym title="Uniform Resource Locator">URL</acronym>-([\w\/\?\.-]+).*/, &#8220;$1&#8243;);</p>
<p>Thanks in advance!</p>
<p>=)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-481520</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Tue, 02 Dec 2008 21:36:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-481520</guid>
		<description>Rodrigo,

Haven't tested it, but if it works: great!

Aldo,

As the source is now, it doesn't support some of those characters. This line needs to be tweaked to make it happen:

&lt;code&gt;var url = this.currentElm.className.replace(/.*url-([\w\/\?\.-]+).*/, "$1");&lt;/code&gt;.

Should be pretty easy to just add \: and perhaps something more, but I have a ton of other things to do at the moment. Sorry.</description>
		<content:encoded><![CDATA[<p>Rodrigo,</p>
<p>Haven&#8217;t tested it, but if it works: great!</p>
<p>Aldo,</p>
<p>As the source is now, it doesn&#8217;t support some of those characters. This line needs to be tweaked to make it happen:</p>
<p><code>var <acronym title="Uniform Resource Locator">URL</acronym> = this.currentElm.className.replace(/.*<acronym title="Uniform Resource Locator">URL</acronym>-([\w\/\?\.-]+).*/, &#8220;$1&#8243;);</code>.</p>
<p>Should be pretty easy to just add \: and perhaps something more, but I have a ton of other things to do at the moment. Sorry.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aldo Zvala</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-481504</link>
		<dc:creator>Aldo Zvala</dc:creator>
		<pubDate>Tue, 02 Dec 2008 20:40:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-481504</guid>
		<description>tutorial way: input type="text" class="ajax-suggestion url-search-uni.php"

my test: input type="text" class="ajax-suggestion url-http://search.crafta.com/search-uni.php"  (did not worked)</description>
		<content:encoded><![CDATA[<p>tutorial way: input type=&#8221;text&#8221; class=&#8221;<acronym title="Asynchronous Javascript and XML">AJAX</acronym>-suggestion <acronym title="Uniform Resource Locator">URL</acronym>-search-uni.php&#8221;</p>
<p>my test: input type=&#8221;text&#8221; class=&#8221;<acronym title="Asynchronous Javascript and XML">AJAX</acronym>-suggestion <acronym title="Uniform Resource Locator">URL</acronym>-http://search.crafta.com/search-uni.php&#8221;  (did not worked)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aldo Zvala</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-481503</link>
		<dc:creator>Aldo Zvala</dc:creator>
		<pubDate>Tue, 02 Dec 2008 20:38:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-481503</guid>
		<description>Thanks Rodrigo for the fix!!

Roberto and all the other guys:
Is there a way to have the ajax-suggestions script to work in multiple domains?

The tutorial shows to do it this way: 

  - It works great in the same domain, but what my website have many sub domains, like search.mypage.com, store.mypage.com, docs.mypage.com ... in my particular case the only php enabled host is the search.mydomain.com so I cant call locally the search-uni.php from the other domain pages, so I tried this:



And it didn't work... what do you recommend me to do?

Thanks in advance guys

Aldo</description>
		<content:encoded><![CDATA[<p>Thanks Rodrigo for the fix!!</p>
<p>Roberto and all the other guys:<br />
Is there a way to have the <acronym title="Asynchronous Javascript and XML">AJAX</acronym>-suggestions script to work in multiple domains?</p>
<p>The tutorial shows to do it this way: </p>
<p>  - It works great in the same domain, but what my website have many sub domains, like search.mypage.com, store.mypage.com, docs.mypage.com &#8230; in my particular case the only <acronym title="Hypertext PreProcessing">PHP</acronym> enabled host is the search.mydomain.com so I cant call locally the search-uni.php from the other domain pages, so I tried this:</p>
<p>And it didn&#8217;t work&#8230; what do you recommend me to do?</p>
<p>Thanks in advance guys</p>
<p>Aldo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo Gar;cone</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-480449</link>
		<dc:creator>Rodrigo Gar;cone</dc:creator>
		<pubDate>Fri, 28 Nov 2008 14:08:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-480449</guid>
		<description>Fixing IE7 Href Bug

1) Inside Href tag, put a separator like '&#124;&#124;&#124;" before the text you want to be in input text field after selection has been made.

i.e: a href="&#124;&#124;&#124;1" class="item choose-value"

2) Open ajaxSuggestions.js. Search for "href" and replace the line and the next two with the following code:

var value = elm.getAttribute("href").split(escape("&#124;&#124;&#124;"));
if(!new RegExp(value).test(input.value)){
			input.value = ((input.value.length &#62; 0 &#38;&#38; /;/i.test(input.value))? (input.value + value[1]) : value[1]) + ajaxSuggestions.itemSeparator;
		}

That's it</description>
		<content:encoded><![CDATA[<p>Fixing IE7 Href Bug</p>
<p>1) Inside Href tag, put a separator like &#8216;|||&#8221; before the text you want to be in input text field after selection has been made.</p>
<p>i.e: a href=&#8221;|||1&#8243; class=&#8221;item choose-value&#8221;</p>
<p>2) Open ajaxSuggestions.js. Search for &#8220;href&#8221; and replace the line and the next two with the following code:</p>
<p>var value = elm.getAttribute(&#8221;href&#8221;).split(escape(&#8221;|||&#8221;));<br />
if(!new RegExp(value).test(input.value)){<br />
			input.value = ((input.value.length &gt; 0 &amp;&amp; /;/i.test(input.value))? (input.value + value[1]) : value[1]) + ajaxSuggestions.itemSeparator;<br />
		}</p>
<p>That&#8217;s it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-468186</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Thu, 30 Oct 2008 12:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-468186</guid>
		<description>Aldo,

Sorry, nothing has changed with the script. As &lt;a href="http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-68552" rel="nofollow"&gt;my suggestion above&lt;/a&gt;, you need to change the code yourself if you need to alter it.</description>
		<content:encoded><![CDATA[<p>Aldo,</p>
<p>Sorry, nothing has changed with the script. As <a href="http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-68552" rel="nofollow">my suggestion above</a>, you need to change the code yourself if you need to alter it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aldo</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-468168</link>
		<dc:creator>Aldo</dc:creator>
		<pubDate>Thu, 30 Oct 2008 10:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-468168</guid>
		<description>Hello, I'll may sound like a fool asking this... but I feel like I need a little more instructions on how to setup this in my web server, these are my basic question:

 - is already fixed the IE7 (full url in field) issue?
 - if not, could you please give me a suggestion on how to tweak this code to add just the searched term to the input field?

thanks in advance!!</description>
		<content:encoded><![CDATA[<p>Hello, I&#8217;ll may sound like a fool asking this&#8230; but I feel like I need a little more instructions on how to setup this in my web server, these are my basic question:</p>
<p> - is already fixed the IE7 (full <acronym title="Uniform Resource Locator">URL</acronym> in field) issue?<br />
 - if not, could you please give me a suggestion on how to tweak this code to add just the searched term to the input field?</p>
<p>thanks in advance!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-400397</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Mon, 01 Sep 2008 10:16:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-400397</guid>
		<description>jon,

I'm sorry, but I'm doing no further work on this script. Feel free to alter to it your needs!</description>
		<content:encoded><![CDATA[<p>jon,</p>
<p>I&#8217;m sorry, but I&#8217;m doing no further work on this script. Feel free to alter to it your needs!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon eastwood</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-398918</link>
		<dc:creator>jon eastwood</dc:creator>
		<pubDate>Sun, 31 Aug 2008 08:39:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-398918</guid>
		<description>Any news on the IE7 bug as I cant get it not to add the full url of the script I am running, 

Plus why in other browsers does it add ; to the end of the string within the element once you have selected an item from the list items returned?</description>
		<content:encoded><![CDATA[<p>Any news on the IE7 bug as I cant get it not to add the full <acronym title="Uniform Resource Locator">URL</acronym> of the script I am running, </p>
<p>Plus why in other browsers does it add ; to the end of the string within the element once you have selected an item from the list items returned?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tenshi13</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-335439</link>
		<dc:creator>tenshi13</dc:creator>
		<pubDate>Fri, 11 Jul 2008 03:52:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-335439</guid>
		<description>Would like to ask, is it me with php on my win box, on my IE6,
that after i select an item it returns values in URL form, that i need to unescape it?
Or everyone's getting values in the same format?

Real cool script! Thank you very much!!!</description>
		<content:encoded><![CDATA[<p>Would like to ask, is it me with <acronym title="Hypertext PreProcessing">PHP</acronym> on my win box, on my IE6,<br />
that after i select an item it returns values in <acronym title="Uniform Resource Locator">URL</acronym> form, that i need to unescape it?<br />
Or everyone&#8217;s getting values in the same format?</p>
<p>Real cool script! Thank you very much!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-195157</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Mon, 28 Jan 2008 07:48:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-195157</guid>
		<description>Daniel,

I've never used Prototype, but my guess is that they implement something which affect elements, thus it might result in unexpected behavior of some parts.</description>
		<content:encoded><![CDATA[<p>Daniel,</p>
<p>I&#8217;ve never used Prototype, but my guess is that they implement something which affect elements, thus it might result in unexpected behavior of some parts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-194922</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 28 Jan 2008 00:12:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-194922</guid>
		<description>Hi... i like this wonderful AJAX SUGESSTIONS script. Works fine and looks quite nice.

BUT: in the Moment i try to load prototype.js on the same page, i will get errors in IE and Suggestions does not work any longer. 
Error message e.g. "'this.elements.length' is null or no object". Any ideas how to work with it?

Daniel</description>
		<content:encoded><![CDATA[<p>Hi&#8230; i like this wonderful <acronym title="Asynchronous Javascript and XML">AJAX</acronym> SUGESSTIONS script. Works fine and looks quite nice.</p>
<p>BUT: in the Moment i try to load prototype.js on the same page, i will get errors in <acronym title="Internet Explorer">IE</acronym> and Suggestions does not work any longer.<br />
Error message e.g. &#8220;&#8216;this.elements.length&#8217; is null or no object&#8221;. Any ideas how to work with it?</p>
<p>Daniel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KK AW</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-172583</link>
		<dc:creator>KK AW</dc:creator>
		<pubDate>Sun, 30 Dec 2007 23:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-172583</guid>
		<description>Thanks. I will try that.

Happy New Year 2008.</description>
		<content:encoded><![CDATA[<p>Thanks. I will try that.</p>
<p>Happy New Year 2008.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-172413</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Sun, 30 Dec 2007 18:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-172413</guid>
		<description>KK AW,

To make sure AJAX calls work in IE, it has to be run on a server (IIS, Apache etc). Just opening files locally and trying to make AJAX requests in IE will just give you an error.</description>
		<content:encoded><![CDATA[<p>KK AW,</p>
<p>To make sure <acronym title="Asynchronous Javascript and XML">AJAX</acronym> calls work in <acronym title="Internet Explorer">IE</acronym>, it has to be run on a server (<acronym title="Internet Infomation Server">IIS</acronym>, Apache etc). Just opening files locally and trying to make <acronym title="Asynchronous Javascript and XML">AJAX</acronym> requests in <acronym title="Internet Explorer">IE</acronym> will just give you an error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KK AW</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-172332</link>
		<dc:creator>KK AW</dc:creator>
		<pubDate>Sun, 30 Dec 2007 15:14:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-172332</guid>
		<description>Robert,

I tried running you demo (index.html) with IE7 and it gives me an error on line 147 - Access is denied.

"this.xmlHttp.onreadystatechange = this.getResults;"

It works as expected in Firefox.

Anything I have missed?</description>
		<content:encoded><![CDATA[<p>Robert,</p>
<p>I tried running you demo (index.html) with IE7 and it gives me an error on line 147 - Access is denied.</p>
<p>&#8220;this.xmlHttp.onreadystatechange = this.getResults;&#8221;</p>
<p>It works as expected in Firefox.</p>
<p>Anything I have missed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-141119</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Thu, 15 Nov 2007 06:05:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-141119</guid>
		<description>You have a point. I hadn't thought of that.</description>
		<content:encoded><![CDATA[<p>You have a point. I hadn&#8217;t thought of that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-140120</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Wed, 14 Nov 2007 10:27:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-140120</guid>
		<description>Erik,

Personally, I don't condole of custom attributes, since its invalid HTML code and there's really no way to guarantee how it will work cross-browser and cross-platform.</description>
		<content:encoded><![CDATA[<p>Erik,</p>
<p>Personally, I don&#8217;t condole of custom attributes, since its invalid <acronym title="HyperText Markup Language">HTML</acronym> code and there&#8217;s really no way to guarantee how it will work cross-browser and cross-platform.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-139684</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Tue, 13 Nov 2007 22:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-139684</guid>
		<description>Now that I look at it again (I'm having to rewrite my code to take full advantage of this,) there are several options that would be better set per-element with custom attributes. The query url would probably be better as query_url="", for example.</description>
		<content:encoded><![CDATA[<p>Now that I look at it again (I&#8217;m having to rewrite my code to take full advantage of this,) there are several options that would be better set per-element with custom attributes. The query <acronym title="Uniform Resource Locator">URL</acronym> would probably be better as query_url=&#8221;", for example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-134844</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Thu, 08 Nov 2007 08:12:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-134844</guid>
		<description>Erik,

Yes, that might be a good approach to it. 
Good that it worked out for you tweaking it with &lt;code&gt;textarea&lt;/code&gt; elements!</description>
		<content:encoded><![CDATA[<p>Erik,</p>
<p>Yes, that might be a good approach to it.<br />
Good that it worked out for you tweaking it with <code>textarea</code> elements!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-134696</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Thu, 08 Nov 2007 04:08:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2007/04/09/ajax-suggestions-a-new-javascript-library-for-you/#comment-134696</guid>
		<description>To avoid the IE7 thing you could probably just stick the value you want in an attribute that html doesn't do anything with. "value" would be a good choice.

Anyhow, this is pretty nifty. I had to tweak it a little to get it to recognize textareas as well as input, but after that it worked quite excellently.</description>
		<content:encoded><![CDATA[<p>To avoid the IE7 thing you could probably just stick the value you want in an attribute that <acronym title="HyperText Markup Language">HTML</acronym> doesn&#8217;t do anything with. &#8220;value&#8221; would be a good choice.</p>
<p>Anyhow, this is pretty nifty. I had to tweak it a little to get it to recognize textareas as well as input, but after that it worked quite excellently.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
