<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Design &#38; Build, Web Development, Logo Design &#38; IT Consultancy - n7 Studios &#187; jQuery</title>
	<atom:link href="http://www.n7studios.co.uk/category/blog/jquery-blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.n7studios.co.uk</link>
	<description></description>
	<lastBuildDate>Fri, 04 Jun 2010 13:26:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery: Validate FCKEditor using jQuery</title>
		<link>http://www.n7studios.co.uk/2009/03/07/jquery-validate-fckeditor-using-jquery/</link>
		<comments>http://www.n7studios.co.uk/2009/03/07/jquery-validate-fckeditor-using-jquery/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 10:04:46 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[fckeditor]]></category>
		<category><![CDATA[validate]]></category>

		<guid isPermaLink="false">http://www.n7studios.co.uk/?p=41</guid>
		<description><![CDATA[Validate FCKEditor using jQuery, thanks to this small jQuery Plugin.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written a quick jQuery plugin which allows you to validate an FCKEditor instancing using jQuery.  This plugin will both validate FCKEditor instances both on-the-fly (as you type), and when you attempt to submit a form.</p>
<p>1. <a title="jQuery FCKEditor Validator" href="http://www.n7studios.co.uk/downloads/jquery.fckeditorvalidate.js">Download the plugin</a></p>
<p>2. Implement the plugin:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">$<span class="br0">&#40;</span>document<span class="br0">&#41;</span>.<span class="me1">ready</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span><span class="br0">&#40;</span><span class="kw1">typeof</span> jQuery.<span class="me1">fn</span>.<span class="me1">fckEditorValidate</span> == <span class="st0">&#8216;function&#8217;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">jQuery.<span class="me1">fn</span>.<span class="me1">fckEditorValidate</span><span class="br0">&#40;</span><span class="br0">&#123;</span>instanceName: <span class="st0">&#8216;content&#8217;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>The full list of arguments which may appear in the brackets are:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">instanceName: The <span class="kw3">name</span> of the FCKEditor instance <span class="br0">&#40;</span><span class="kw2">default</span>: <span class="st0">&#8216;content&#8217;</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li1">
<div class="de1">preventFormSubmit: Prevent form from submitting <span class="kw1">if</span> FCKEditor instance <span class="kw1">is</span> empty <span class="br0">&#40;</span><span class="kw2">default</span>: <span class="kw2">true</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li1">
<div class="de1">showValidationError: Show a message <span class="kw1">if</span> the FCKEditor instance <span class="kw1">is</span> empty <span class="br0">&#40;</span><span class="kw2">default</span>: <span class="kw2">true</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li1">
<div class="de1">showValidationErrorBeforeFCKEditor: Show the message before the FCKEditor on the page <span class="br0">&#40;</span><span class="kw2">default</span>: <span class="kw2">false</span> &#8211; i.<span class="me1">e</span>. <span class="me1">shows</span> message below FCKEditor<span class="br0">&#41;</span>,</div>
</li>
<li class="li2">
<div class="de2">validationErrorClass: CSS <span class="kw2">class</span> to attribute to label showing validation error message <span class="br0">&#40;</span><span class="kw2">default</span>: <span class="st0">&#8216;fckValidateError&#8217;</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li1">
<div class="de1">validationErrorMessage: Message to show when FCKEditor instance <span class="kw1">is</span> empty <span class="br0">&#40;</span><span class="kw2">default</span>: <span class="st0">&#8216;Please complete this field&#8217;</span><span class="br0">&#41;</span></div>
</li>
</ol>
</div>
<p>This is by no means an exhaustive or complete solution; you should always implement some server-side validation.  Javascript cannot be solely relied upon, as users may not have it in their web browser, or may choose to disable it.  There&#8217;s also some known issues with IE with the on-the-fly (as you type) validation being a bit hit and miss.</p>
<p>When the form is submitted, this plugin will kick in and has been tested on IE6, 7, Firefox 3 and Safari 3. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.n7studios.co.uk/2009/03/07/jquery-validate-fckeditor-using-jquery/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>jQuery Detect Plugin Function</title>
		<link>http://www.n7studios.co.uk/2009/03/07/jquery-detect-plugin-function/</link>
		<comments>http://www.n7studios.co.uk/2009/03/07/jquery-detect-plugin-function/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 10:01:15 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[typeof]]></category>

		<guid isPermaLink="false">http://www.n7studios.co.uk/?p=37</guid>
		<description><![CDATA[Using the typeof operator helps to check if jQuery functions - or Javascript functions in general - are in scope.]]></description>
			<content:encoded><![CDATA[<p>To help prevent Javascript errors that stop the rest of your script working, because you&#8217;ve forgotten to include a jQuery Plugin, or you have a jQuery Plugin that may not always be within scope, you can use the typeof operator to see if a plugin exists. It&#8217;s also great for debugging. You&#8217;ll need to get the function name from the plugin file.  For example, to detect if the prettyCheckboxes plugin is included:</p>
<p>if(typeof jQuery.fn.prettyCheckboxes == &#8216;function&#8217;) {<br />
// Javascript Code to Run here<br />
alert(&#8220;prettyCheckboxes jQuery Plugin is installed!&#8221;);<br />
} </p>
]]></content:encoded>
			<wfw:commentRss>http://www.n7studios.co.uk/2009/03/07/jquery-detect-plugin-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
