<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Refreshing DIV content with AJAX (multiple DIVs)</title>
	<atom:link href="http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/</link>
	<description>A little bit of everything...</description>
	<lastBuildDate>Sat, 13 Feb 2010 06:52:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kamil</title>
		<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/comment-page-1/#comment-885</link>
		<dc:creator>Kamil</dc:creator>
		<pubDate>Mon, 09 Nov 2009 22:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=397#comment-885</guid>
		<description>Thanks for publishing this resource. Saved me a lot of grief! Works perfectly! :)</description>
		<content:encoded><![CDATA[<p>Thanks for publishing this resource. Saved me a lot of grief! Works perfectly! <img src='http://www.aleixcortadellas.com/main/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleix</title>
		<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/comment-page-1/#comment-858</link>
		<dc:creator>Aleix</dc:creator>
		<pubDate>Thu, 15 Oct 2009 16:44:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=397#comment-858</guid>
		<description>Hello Rainier,

I&#039;ve thought of your issue - new to me -, and I could just think of one approach. I am not sure it&#039;s the only one neither the easiest one, but I believe it could do the job.

The approach is to import the whole boo.php file, but just dump into the target DIV of the main page the information contained in the origin DIV of the boo.php file. The filtering could be done with JavaScript, by using string functions as found here:
http://www.w3schools.com/jsref/jsref_obj_string.asp

The functions you could use for that are two:

&lt;strong&gt;&lt;a href=&quot;http://www.w3schools.com/jsref/jsref_search.asp&quot; rel=&quot;nofollow&quot;&gt;Search()&lt;/a&gt;
&lt;a href=&quot;http://www.w3schools.com/jsref/jsref_slice_string.asp&quot; rel=&quot;nofollow&quot;&gt;Slice()&lt;/a&gt;&lt;/strong&gt;

Assuming the string is the whole imported boo.php code; with search() you find the start and ending numbers for slicing the string into pieces. You want here to start slicing where the following is found in the string: &lt;strong&gt;&lt; div id = &quot;origin_div&quot; &gt;&lt;/strong&gt; and end the slice where the corresponding &lt;strong&gt;&lt; / div &gt;&lt;/strong&gt; is found. Use the search() to find where those points are, and then assign those values to the slice() function. The sliced part should be the wished content and therefore the only part of the whole string to be displayed in the target DIV. 

I&#039;m not sure if I explained it clearly enough, I hope yes, as I unfortunately don&#039;t have the time to code this. Let me know if you get it to work, however ;-)

Greetings

N.B.: If I&#039;m not wrong, I think you cannot import external pages content using the AJAX method, just those present in your server (security grounds).</description>
		<content:encoded><![CDATA[<p>Hello Rainier,</p>
<p>I&#8217;ve thought of your issue &#8211; new to me -, and I could just think of one approach. I am not sure it&#8217;s the only one neither the easiest one, but I believe it could do the job.</p>
<p>The approach is to import the whole boo.php file, but just dump into the target DIV of the main page the information contained in the origin DIV of the boo.php file. The filtering could be done with JavaScript, by using string functions as found here:<br />
<a href="http://www.w3schools.com/jsref/jsref_obj_string.asp" rel="nofollow">http://www.w3schools.com/jsref/jsref_obj_string.asp</a></p>
<p>The functions you could use for that are two:</p>
<p><strong><a href="http://www.w3schools.com/jsref/jsref_search.asp" rel="nofollow">Search()</a><br />
<a href="http://www.w3schools.com/jsref/jsref_slice_string.asp" rel="nofollow">Slice()</a></strong></p>
<p>Assuming the string is the whole imported boo.php code; with search() you find the start and ending numbers for slicing the string into pieces. You want here to start slicing where the following is found in the string: <strong>< div id = "origin_div" ></strong> and end the slice where the corresponding <strong>< / div ></strong> is found. Use the search() to find where those points are, and then assign those values to the slice() function. The sliced part should be the wished content and therefore the only part of the whole string to be displayed in the target DIV. </p>
<p>I&#8217;m not sure if I explained it clearly enough, I hope yes, as I unfortunately don&#8217;t have the time to code this. Let me know if you get it to work, however <img src='http://www.aleixcortadellas.com/main/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Greetings</p>
<p>N.B.: If I&#8217;m not wrong, I think you cannot import external pages content using the AJAX method, just those present in your server (security grounds).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rainier</title>
		<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/comment-page-1/#comment-857</link>
		<dc:creator>Rainier</dc:creator>
		<pubDate>Thu, 15 Oct 2009 16:21:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=397#comment-857</guid>
		<description>Nice code Aleix!
I want to use your code to load only a specific div from the boo pages.
My boo pages in my case will be complete php pages with header, menus, sidebars, etc; and I cannot load all that stuff because it would screw the layout of the main page.
I&#039;m planning to use your code to display news from other pages of my website. Not the entire news, only the first two paragraphs for each one of them with a &#039;read more&#039; link to go to the complete news.
Any help you can provide will be much aprreciated.</description>
		<content:encoded><![CDATA[<p>Nice code Aleix!<br />
I want to use your code to load only a specific div from the boo pages.<br />
My boo pages in my case will be complete php pages with header, menus, sidebars, etc; and I cannot load all that stuff because it would screw the layout of the main page.<br />
I&#8217;m planning to use your code to display news from other pages of my website. Not the entire news, only the first two paragraphs for each one of them with a &#8216;read more&#8217; link to go to the complete news.<br />
Any help you can provide will be much aprreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/comment-page-1/#comment-854</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Wed, 14 Oct 2009 10:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=397#comment-854</guid>
		<description>oh ..its really great tutorial in DIV with ajax.
thanks dude .....</description>
		<content:encoded><![CDATA[<p>oh ..its really great tutorial in DIV with ajax.<br />
thanks dude &#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chad</title>
		<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/comment-page-1/#comment-367</link>
		<dc:creator>chad</dc:creator>
		<pubDate>Sun, 26 Jul 2009 19:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=397#comment-367</guid>
		<description>Hello,

I want to pass this PHP variable $destFile from index.html to foo.php so that i can then use that variable inside foo.php.

I am able to do this with php include, but not sure how to do this here.

great code, and will be the best if i can get this figured out!</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I want to pass this PHP variable $destFile from index.html to foo.php so that i can then use that variable inside foo.php.</p>
<p>I am able to do this with php include, but not sure how to do this here.</p>
<p>great code, and will be the best if i can get this figured out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward</title>
		<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/comment-page-1/#comment-356</link>
		<dc:creator>Edward</dc:creator>
		<pubDate>Wed, 22 Jul 2009 17:20:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=397#comment-356</guid>
		<description>Thanks Aleix that was it!</description>
		<content:encoded><![CDATA[<p>Thanks Aleix that was it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepali</title>
		<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/comment-page-1/#comment-346</link>
		<dc:creator>Deepali</dc:creator>
		<pubDate>Fri, 10 Jul 2009 07:40:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=397#comment-346</guid>
		<description>cool stuff! bookmarked! :)</description>
		<content:encoded><![CDATA[<p>cool stuff! bookmarked! <img src='http://www.aleixcortadellas.com/main/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleix</title>
		<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/comment-page-1/#comment-330</link>
		<dc:creator>Aleix</dc:creator>
		<pubDate>Sat, 04 Jul 2009 10:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=397#comment-330</guid>
		<description>Hello Edward,

Try adding the following:

  &lt;strong&gt;   var seconds;&lt;/strong&gt;

in the line just before

&lt;strong&gt;     window.onload = function startrefresh(){&lt;/strong&gt;

Kind regards</description>
		<content:encoded><![CDATA[<p>Hello Edward,</p>
<p>Try adding the following:</p>
<p>  <strong>   var seconds;</strong></p>
<p>in the line just before</p>
<p><strong>     window.onload = function startrefresh(){</strong></p>
<p>Kind regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward</title>
		<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/comment-page-1/#comment-328</link>
		<dc:creator>Edward</dc:creator>
		<pubDate>Thu, 25 Jun 2009 22:10:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=397#comment-328</guid>
		<description>Hi, Aleix

Do you have any idea why IE8 keeps saying &#039;seconds&#039; is undefined. I have your code working fine, but would like to get rid of the error if possible.

http://www.edwardbrett.com/test.html

Thanks,
Edward</description>
		<content:encoded><![CDATA[<p>Hi, Aleix</p>
<p>Do you have any idea why IE8 keeps saying &#8217;seconds&#8217; is undefined. I have your code working fine, but would like to get rid of the error if possible.</p>
<p><a href="http://www.edwardbrett.com/test.html" rel="nofollow">http://www.edwardbrett.com/test.html</a></p>
<p>Thanks,<br />
Edward</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rahul</title>
		<link>http://www.aleixcortadellas.com/main/2009/02/25/refreshing-div-content-with-ajax-multiple-divs/comment-page-1/#comment-316</link>
		<dc:creator>rahul</dc:creator>
		<pubDate>Fri, 08 May 2009 11:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=397#comment-316</guid>
		<description>Hello,






the content div was upadated with ajax 

this is ajax loaded div content

but when i view the contents in view page source the div still remains same instead it should replace with above code.also please tell me ajax has any effect on web crawler</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>the content div was upadated with ajax </p>
<p>this is ajax loaded div content</p>
<p>but when i view the contents in view page source the div still remains same instead it should replace with above code.also please tell me ajax has any effect on web crawler</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.216 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-01-23 10:21:34 -->

