<?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: Generating element IDs with JavaScript and counters</title>
	<atom:link href="http://forumsblogswikis.com/2008/05/26/generating-element-ids-with-javascript-and-counters/feed/" rel="self" type="application/rss+xml" />
	<link>http://forumsblogswikis.com/2008/05/26/generating-element-ids-with-javascript-and-counters/</link>
	<description>News on forums, blogs, wikis, cms, etc</description>
	<lastBuildDate>Sat, 05 May 2012 14:44:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Mike</title>
		<link>http://forumsblogswikis.com/2008/05/26/generating-element-ids-with-javascript-and-counters/comment-page-1/#comment-5727</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sat, 20 Aug 2011 14:08:25 +0000</pubDate>
		<guid isPermaLink="false">http://forumsblogswikis.com/?p=267#comment-5727</guid>
		<description>I think Flemming is referring to the situation where the same script is running in 2 separate browsers at the same time, communicating the id to a common server as a unique id.  In that case, a duplicate is possible, right?</description>
		<content:encoded><![CDATA[<p>I think Flemming is referring to the situation where the same script is running in 2 separate browsers at the same time, communicating the id to a common server as a unique id.  In that case, a duplicate is possible, right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://forumsblogswikis.com/2008/05/26/generating-element-ids-with-javascript-and-counters/comment-page-1/#comment-5555</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Fri, 12 Nov 2010 23:38:39 +0000</pubDate>
		<guid isPermaLink="false">http://forumsblogswikis.com/?p=267#comment-5555</guid>
		<description>Two different places?  Every time it&#039;s called it&#039;s incremented for that visitor.  It&#039;s building a page for that user with a unique id so it doesn&#039;t matter if two visitors have the same id.</description>
		<content:encoded><![CDATA[<p>Two different places?  Every time it&#8217;s called it&#8217;s incremented for that visitor.  It&#8217;s building a page for that user with a unique id so it doesn&#8217;t matter if two visitors have the same id.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flemming</title>
		<link>http://forumsblogswikis.com/2008/05/26/generating-element-ids-with-javascript-and-counters/comment-page-1/#comment-5554</link>
		<dc:creator>Flemming</dc:creator>
		<pubDate>Fri, 12 Nov 2010 22:37:27 +0000</pubDate>
		<guid isPermaLink="false">http://forumsblogswikis.com/?p=267#comment-5554</guid>
		<description>So what happends if the function is called from two different places at the exact same time?</description>
		<content:encoded><![CDATA[<p>So what happends if the function is called from two different places at the exact same time?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://forumsblogswikis.com/2008/05/26/generating-element-ids-with-javascript-and-counters/comment-page-1/#comment-5459</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 08 Jul 2010 14:09:56 +0000</pubDate>
		<guid isPermaLink="false">http://forumsblogswikis.com/?p=267#comment-5459</guid>
		<description>I didn&#039;t really need it to be unique overall, just unique to the page.  So a global counter worked for me.  I did actually play with the Date object originally but found it was a little unnecessary for my needs.  

Like the idea though.  Your code is simpler than what I came up with originally.</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t really need it to be unique overall, just unique to the page.  So a global counter worked for me.  I did actually play with the Date object originally but found it was a little unnecessary for my needs.  </p>
<p>Like the idea though.  Your code is simpler than what I came up with originally.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fernando</title>
		<link>http://forumsblogswikis.com/2008/05/26/generating-element-ids-with-javascript-and-counters/comment-page-1/#comment-5458</link>
		<dc:creator>Fernando</dc:creator>
		<pubDate>Thu, 08 Jul 2010 13:35:48 +0000</pubDate>
		<guid isPermaLink="false">http://forumsblogswikis.com/?p=267#comment-5458</guid>
		<description>Maybe it&#039;s the way to do the same thing you posted before but without bug.. ?

	var uniqueCounter=0;
	function uid(){
		uniqueCounter++;
		var newDate = new Date;
		return newDate.getTime() + uniqueCounter++;
	}</description>
		<content:encoded><![CDATA[<p>Maybe it&#8217;s the way to do the same thing you posted before but without bug.. ?</p>
<p>	var uniqueCounter=0;<br />
	function uid(){<br />
		uniqueCounter++;<br />
		var newDate = new Date;<br />
		return newDate.getTime() + uniqueCounter++;<br />
	}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

