<?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: Setting up jQuery with salesforce.com</title>
	<atom:link href="http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/</link>
	<description>Force.com - jQuery - Technology - Life</description>
	<lastBuildDate>Wed, 08 Sep 2010 01:23:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Ron Wild</title>
		<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/comment-page-1/#comment-875</link>
		<dc:creator>Ron Wild</dc:creator>
		<pubDate>Mon, 24 May 2010 18:25:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=454#comment-875</guid>
		<description>Jason - Thanks for the great post!  Saved me a lot of trouble trying to fix conflicts with jQuery.</description>
		<content:encoded><![CDATA[<p>Jason &#8211; Thanks for the great post!  Saved me a lot of trouble trying to fix conflicts with jQuery.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KiloJ</title>
		<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/comment-page-1/#comment-840</link>
		<dc:creator>KiloJ</dc:creator>
		<pubDate>Wed, 12 May 2010 16:08:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=454#comment-840</guid>
		<description>Gents, I&#039;m such a dummy...
I followed the instructions at the top of the page to a tee this time and the problem is fixed!

Jason - congratulations for such a fantastic blog! It&#039;s a great resource ;)
Keep up the great work.

Regards
KJ</description>
		<content:encoded><![CDATA[<p>Gents, I&#8217;m such a dummy&#8230;<br />
I followed the instructions at the top of the page to a tee this time and the problem is fixed!</p>
<p>Jason &#8211; congratulations for such a fantastic blog! It&#8217;s a great resource <img src='http://www.tehnrd.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Keep up the great work.</p>
<p>Regards<br />
KJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KiloJ</title>
		<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/comment-page-1/#comment-839</link>
		<dc:creator>KiloJ</dc:creator>
		<pubDate>Wed, 12 May 2010 15:51:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=454#comment-839</guid>
		<description>&lt;a href=&quot;#comment-838&quot; rel=&quot;nofollow&quot;&gt;@KiloJ &lt;/a&gt; 
Sorry, the last big of my previous post - I removed all the JQuery from my visualforce page (including the import for the JQuery library - apex:includeScript) and the problem goes away. 

Thanks,
KJ</description>
		<content:encoded><![CDATA[<p><a href="#comment-838" rel="nofollow">@KiloJ </a><br />
Sorry, the last big of my previous post &#8211; I removed all the JQuery from my visualforce page (including the import for the JQuery library &#8211; apex:includeScript) and the problem goes away. </p>
<p>Thanks,<br />
KJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KiloJ</title>
		<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/comment-page-1/#comment-838</link>
		<dc:creator>KiloJ</dc:creator>
		<pubDate>Wed, 12 May 2010 15:49:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=454#comment-838</guid>
		<description>Hi again guys. I&#039;ve noticed a really really frustrating error when trying to work with JQuery in Visualforce. I include the JQuery library in my visualforce page and I get the following Firefox error when viewing my visualforce page:

element.dispatchEvent is not a function
event.eventName=eventName;event.memo=m...nt.fireEvent(event.eventType,event);} 

There is some sort of conflict between JQuery and the another script that is included by salesforce &quot;https://na1.salesforce.com/faces/a4j/g/3_3_0.GAorg.ajax4jsf.javascript.PrototypeScript&quot;. I have viewed the developer.force.com forums and found the following solution (http://community.salesforce.com/t5/Visualforce-Development/Not-able-to-Include-jQuery-JS-file-in-Visualforce-page/m-p/161635) albeit (You&#039;ve guessed it!) it doesn&#039;t work for me...

I only use &quot;jQuery(...)&quot; namespace. I don&#039;t use &#039;$&#039;. I tried including the following code snippet directly after including the JQuery library in my visualforce page &quot;jQuery.noConflict();&quot; but this doesn&#039;t work. I keep getting the error. I even went so far as to remove all the JQuery from my visualforce page, including the &quot;include&quot; declaration for the JQuery library and the problem persists! Surely one of you gurus must have come up against this error before? If so, can you post a correct solution to this really irritation problem!

Many thanks indeed
KJ</description>
		<content:encoded><![CDATA[<p>Hi again guys. I&#8217;ve noticed a really really frustrating error when trying to work with JQuery in Visualforce. I include the JQuery library in my visualforce page and I get the following Firefox error when viewing my visualforce page:</p>
<p>element.dispatchEvent is not a function<br />
event.eventName=eventName;event.memo=m&#8230;nt.fireEvent(event.eventType,event);} </p>
<p>There is some sort of conflict between JQuery and the another script that is included by salesforce &#8220;https://na1.salesforce.com/faces/a4j/g/3_3_0.GAorg.ajax4jsf.javascript.PrototypeScript&#8221;. I have viewed the developer.force.com forums and found the following solution (<a href="http://community.salesforce.com/t5/Visualforce-Development/Not-able-to-Include-jQuery-JS-file-in-Visualforce-page/m-p/161635" rel="nofollow">http://community.salesforce.com/t5/Visualforce-Development/Not-able-to-Include-jQuery-JS-file-in-Visualforce-page/m-p/161635</a>) albeit (You&#8217;ve guessed it!) it doesn&#8217;t work for me&#8230;</p>
<p>I only use &#8220;jQuery(&#8230;)&#8221; namespace. I don&#8217;t use &#8216;$&#8217;. I tried including the following code snippet directly after including the JQuery library in my visualforce page &#8220;jQuery.noConflict();&#8221; but this doesn&#8217;t work. I keep getting the error. I even went so far as to remove all the JQuery from my visualforce page, including the &#8220;include&#8221; declaration for the JQuery library and the problem persists! Surely one of you gurus must have come up against this error before? If so, can you post a correct solution to this really irritation problem!</p>
<p>Many thanks indeed<br />
KJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simona</title>
		<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/comment-page-1/#comment-836</link>
		<dc:creator>Simona</dc:creator>
		<pubDate>Mon, 10 May 2010 22:05:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=454#comment-836</guid>
		<description>It does not work on apex:inputField  with date value.
Disabling a Datepicker field for this works, but when I added validation – validation is not working. Any idea?

Thanks a lot!
Simona</description>
		<content:encoded><![CDATA[<p>It does not work on apex:inputField  with date value.<br />
Disabling a Datepicker field for this works, but when I added validation – validation is not working. Any idea?</p>
<p>Thanks a lot!<br />
Simona</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KiloJ</title>
		<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/comment-page-1/#comment-747</link>
		<dc:creator>KiloJ</dc:creator>
		<pubDate>Mon, 12 Apr 2010 10:25:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=454#comment-747</guid>
		<description>Guys, that&#039;s fantastic information! Thank you so much - this will help me out greatly.

Best,
KJ</description>
		<content:encoded><![CDATA[<p>Guys, that&#8217;s fantastic information! Thank you so much &#8211; this will help me out greatly.</p>
<p>Best,<br />
KJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Tuttle</title>
		<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/comment-page-1/#comment-743</link>
		<dc:creator>Richard Tuttle</dc:creator>
		<pubDate>Fri, 09 Apr 2010 17:50:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=454#comment-743</guid>
		<description>@KiloJ

Another note, you used the actual short name for jQuery.  If you do any sort of rerendering, as mentioned in this article and my first comment you&#039;ll end up with prototype (or is it extjs?) stealing the $ object.  To fix this use the no conflict method Jason shows in his article and call jQuery as jQuery(&#039;selectorhere&#039;).</description>
		<content:encoded><![CDATA[<p>@KiloJ</p>
<p>Another note, you used the actual short name for jQuery.  If you do any sort of rerendering, as mentioned in this article and my first comment you&#8217;ll end up with prototype (or is it extjs?) stealing the $ object.  To fix this use the no conflict method Jason shows in his article and call jQuery as jQuery(&#8216;selectorhere&#8217;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Tuttle</title>
		<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/comment-page-1/#comment-742</link>
		<dc:creator>Richard Tuttle</dc:creator>
		<pubDate>Fri, 09 Apr 2010 17:47:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=454#comment-742</guid>
		<description>@KiloJ

What Jason said is exactly how I do this as well.  Also lately I&#039;ve been not using outputPanel and using an actual div instead.  This is useful if you only need to use it with JavaScript and not necessarily any of the built in AJAX ie: rerendering that panel.</description>
		<content:encoded><![CDATA[<p>@KiloJ</p>
<p>What Jason said is exactly how I do this as well.  Also lately I&#8217;ve been not using outputPanel and using an actual div instead.  This is useful if you only need to use it with JavaScript and not necessarily any of the built in AJAX ie: rerendering that panel.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/comment-page-1/#comment-740</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 09 Apr 2010 15:34:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=454#comment-740</guid>
		<description>@KiloJ

This is possible but it requires a little extra work. The best way is to give all visualforce components id values and then when you look at the source you may see the panel that has an Id like &quot;thePage:panel2&quot;. Then you can do a selector like this:

var componentId = fixId( &#039;{!$Component.thePage.panel2}&#039; );

$(componentId).click(function(){
//cool stuff
});

function fixId(myid) {
    return &#039;#&#039; + myid.replace(/(:&#124;\.)/g,&#039;\\\\$1&#039;);
}

You could also put the fixId function straight into the jQuery selector but I seperated it out here to keep it simple. 

Wes has put together a good post on this issue here: http://developinthecloud.wordpress.com/2010/02/17/visualforce-ids-in-jquery-selectors/</description>
		<content:encoded><![CDATA[<p>@KiloJ</p>
<p>This is possible but it requires a little extra work. The best way is to give all visualforce components id values and then when you look at the source you may see the panel that has an Id like &#8220;thePage:panel2&#8243;. Then you can do a selector like this:</p>
<p>var componentId = fixId( &#8216;{!$Component.thePage.panel2}&#8217; );</p>
<p>$(componentId).click(function(){<br />
//cool stuff<br />
});</p>
<p>function fixId(myid) {<br />
    return &#8216;#&#8217; + myid.replace(/(:|\.)/g,&#8217;\\\\$1&#8242;);<br />
}</p>
<p>You could also put the fixId function straight into the jQuery selector but I seperated it out here to keep it simple. </p>
<p>Wes has put together a good post on this issue here: <a href="http://developinthecloud.wordpress.com/2010/02/17/visualforce-ids-in-jquery-selectors/" rel="nofollow">http://developinthecloud.wordpress.com/2010/02/17/visualforce-ids-in-jquery-selectors/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KiloJ</title>
		<link>http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/comment-page-1/#comment-739</link>
		<dc:creator>KiloJ</dc:creator>
		<pubDate>Fri, 09 Apr 2010 14:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=454#comment-739</guid>
		<description>Hey. Do you know of any way to use a jquery selector to select say an ouput panel in a page?

For example if you have:



   $(document).ready(function() {
      $(&#039;panelTwo&#039;).click(function() {...
   });




   


This wont work because the id&#039;s are prefixed with the name of the parent separated by a colon. You can see this if you view the source of the generated HTML of the VF page. I&#039;ve no idea other than to use raw HTML in my code. Any ideas? Thanks</description>
		<content:encoded><![CDATA[<p>Hey. Do you know of any way to use a jquery selector to select say an ouput panel in a page?</p>
<p>For example if you have:</p>
<p>   $(document).ready(function() {<br />
      $(&#8216;panelTwo&#8217;).click(function() {&#8230;<br />
   });</p>
<p>This wont work because the id&#8217;s are prefixed with the name of the parent separated by a colon. You can see this if you view the source of the generated HTML of the VF page. I&#8217;ve no idea other than to use raw HTML in my code. Any ideas? Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
