<?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"
	>

<channel>
	<title>Developer Tutorials' Webmaster Blog &#187; JavaScript</title>
	<atom:link href="http://www.developertutorials.com/blog/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.developertutorials.com/blog</link>
	<description>Keeping webmasters up-to-date on technology.</description>
	<pubDate>Tue, 02 Sep 2008 14:59:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Create a Custom Firefox Search Tool in Five Minutes</title>
		<link>http://www.developertutorials.com/blog/general/create-a-custom-firefox-search-tool-in-five-minutes-325/</link>
		<comments>http://www.developertutorials.com/blog/general/create-a-custom-firefox-search-tool-in-five-minutes-325/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 13:47:16 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/general/create-a-custom-firefox-search-tool-in-five-minutes-325/</guid>
		<description><![CDATA[site:yourblogname.com searchterm
This is an example how to search your blog as a query in Google.  But have you ever wanted to learn how to make your own &#8216;Search Tools&#8217; for Firefox so that you can look-up information on your own blog quickly, from anywhere on the internet? Or do you want to hack Google [...]]]></description>
			<content:encoded><![CDATA[<p><code>site:yourblogname.com searchterm</code></p>
<p>This is an example how to search your blog as a query in Google.  But have you ever wanted to learn how to make your own &#8216;Search Tools&#8217; for Firefox so that you can look-up information on your own blog quickly, from anywhere on the internet? Or do you want to hack Google Custom search to improve your earnings and it&#8217;s functionality?</p>
<p><a href='http://www.developertutorials.com/blog/wp-content/uploads/2008/07/picture-13.png'><img src="http://www.developertutorials.com/blog/wp-content/uploads/2008/07/picture-13-300x104.png" alt="" width="300" height="104" class="alignnone size-medium wp-image-327" /></a></p>
<p><span id="more-325"></span></p>
<p>It turns out making a search tool is relatively simple.  In fact using <a href="http://ready.to/search/en/#">this tool</a>, you can make one in about five minutes.  The trick is to figure out what a search query on your blog looks like.  For Wordpress users, it might look like this:</p>
<p><code>http://yourblog.com/blog/?s=news&amp;search=Search</code></p>
<p>This is important because you&#8217;ll notice the form asks you for a <strong>front of search term</strong> and a <strong>back of search term</strong>.  The query itself should be left out so that your users can enter whatever they want.  Let&#8217;s dissect the search query&#8230;.</p>
<p>FRONT<br />
<code>http://yourblog.com/blog/?s=</code></p>
<p>QUERY<br />
<code>news</code></p>
<p>BACK<br />
<code>&amp;search=Search</code></p>
<p>Your own search queries may look a bit different than this depending upon the software you use.  To get the query preform a search using the GUI and then copy and paste the query from the navigation bar.  </p>
<p><a href='http://www.developertutorials.com/blog/wp-content/uploads/2008/07/picture-2.png'><img src="http://www.developertutorials.com/blog/wp-content/uploads/2008/07/picture-2-300x24.png" alt="" width="300" height="24" class="alignnone size-medium wp-image-326" /></a></p>
<p>If you&#8217;re using Google custom search, you&#8217;ll notice that the query looks very different.  This is because they use identifiers to keep track of revenues earned from custom search.  Now, I have no idea if hacking their custom code is a violation of TOS but I&#8217;ve done it, it works but since it&#8217;s questionable I can&#8217;t flat out explain what to do here.  Instead, we&#8217;ll create one using the Wordpress specific query&#8230;.</p>
<p><a href='http://www.developertutorials.com/blog/wp-content/uploads/2008/07/picture-81.png'><img src="http://www.developertutorials.com/blog/wp-content/uploads/2008/07/picture-81-300x213.png" alt="" width="300" height="213" class="alignnone size-medium wp-image-328" /></a></p>
<p>Ready.to then creates the XML file needed to add custom search to your top navigation bar.  You can see where it puts the tool below:</p>
<p><a href='http://www.developertutorials.com/blog/wp-content/uploads/2008/07/picture-71.png'><img src="http://www.developertutorials.com/blog/wp-content/uploads/2008/07/picture-71-253x300.png" alt="" width="253" height="300" class="alignnone size-medium wp-image-330" /></a></p>
<p>Notice that I now have custom search option added to my Firefox Toolbar.  That&#8217;s great, you&#8217;ve got an XML file, however if you upload the file to your blog and link to it, Firefox won&#8217;t know to execute the script.  To do that you need to add a bit of javascript code to the header of your site and use another custom query for linking.</p>
<p><code>&lt;script type="text/javascript"&gt;<br />
&lt;!--<br />
function addp(csurl) {<br />
try {<br />
window.external.AddSearchProvider(csurl);<br />
} catch (e) {<br />
alert("You need to use Internet Explorer (7.0 or later)<br />
or Firefox (2.0 or later) to install the OpenSearch plug-in.");<br />
}}<br />
//--&gt;<br />
&lt;/SCRIPT&gt;</code></p>
<p>That script tells the browser what to do with the .xml file.  Now we need to tell Firefox where to find it, and that it&#8217;s an executable and not just a linked file.  We do this with the <strong>addp</strong> request defined in the header script&#8230;</p>
<p><code><br />
&lt;a href="#" onClick="addp(&quot;http://developertutorials.com/blog/DevTut.xml&quot;);"&gt;</code></p>
<p>This tells the browser that the file is executable, the script tells FireFox what to do with that executable (add it to the toolbar).</p>
<p>That&#8217;s it, if everything went well you&#8217;ve created a custom search tool for Firefox in about five minutes.  You can get the Developer Tutorial Firefox Search Tool <a href="http://appfrica.net/blog/test145">here</a>.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d325" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/general/create-a-custom-firefox-search-tool-in-five-minutes-325/&amp;title=Create+a+Custom+Firefox+Search+Tool+in+Five+Minutes" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/general/create-a-custom-firefox-search-tool-in-five-minutes-325/&amp;title=Create+a+Custom+Firefox+Search+Tool+in+Five+Minutes" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/general/create-a-custom-firefox-search-tool-in-five-minutes-325/&amp;title=Create+a+Custom+Firefox+Search+Tool+in+Five+Minutes" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/general/create-a-custom-firefox-search-tool-in-five-minutes-325/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What is sIFR?</title>
		<link>http://www.developertutorials.com/blog/javascript/what-is-sifr-199/</link>
		<comments>http://www.developertutorials.com/blog/javascript/what-is-sifr-199/#comments</comments>
		<pubDate>Thu, 29 May 2008 04:39:49 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[fonts]]></category>

		<category><![CDATA[sifr]]></category>

		<category><![CDATA[type]]></category>

		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/javascript/what-is-sifr-199/</guid>
		<description><![CDATA[There&#8217;s a buzz spreading through the web design community like a virus.  It&#8217;s called sIFR (Scalable Inman Flash Replacement).   What is sIFR?  Essentially, it&#8217;s a technology that replaces short passages of plain browser text with text rendered in the typeface of your choice, regardless of whether or not your users have [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a buzz spreading through the web design community like a virus.  It&#8217;s called sIFR (<strong>S</strong>calable <strong>I</strong>nman <strong>F</strong>lash <strong>R</strong>eplacement).   What is sIFR?  Essentially, it&#8217;s a technology that replaces short passages of plain browser text with text rendered in the typeface of your choice, regardless of whether or not your users have that font installed on their systems.</p>
<p>It accomplishes this by using a combination of javascript, CSS, and Flash. Here is the entire process:</p>
<p><span id="more-199"></span></p>
<blockquote cite="http://www.mikeindustries.com/blog/sifr/"><p>
1. A normal (X)HTML page is loaded into the browser.<br />
2. A javascript function is run which first checks that Flash is installed and then looks for whatever tags, ids, or classes you designate.<br />
3. If Flash isn’t installed (or obviously if javascript is turned off), the (X)HTML page displays as normal and nothing further occurs. If Flash is installed, javascript traverses through the source of your page measuring each element you’ve designated as something you’d like “sIFRed”.<br />
4. Once measured, the script creates Flash movies of the same dimensions and overlays them on top of the original elements, pumping the original browser text in as a Flash variable.<br />
5. Actionscript inside of each Flash file then draws that text in your chosen typeface at a 6 point size and scales it up until it fits snugly inside the Flash movie.
</p>
</blockquote>
<p>It sounds a little too good to be true, yet it&#8217;s the breakthrough all designers and creative have been waiting for as it makes the display of vibrant text possible even in cases where you have no idea what the end users system capabilities are.   The best part is text remains parsible the sIFR developers explain&#8230;.</p>
<blockquote cite="http://www.mikeindustries.com/blog/sifr/"><p>
sIFR is fully accessible to screenreaders and other assistive technology. Don’t take our word for it&#8230;&#8230;The knee-jerk reaction of some people whenever they see Flash is that it must be inaccessible because it’s Flash. What we’ve done with sIFR, however, is turn that model completely on its head. Your (X)HTML document is still the exact same document it was before sIFR kicked in. Your code is untouched and sIFR is completely abstracted to the javascript layer; therefore, your accessibility, your search engine friendliness, and your semantics are the same as they were before the day you decided you like nice fonts.
</p>
</blockquote>
<p>sIFR stands poised to revolutionize the way we think about design and typography on the web.  what happens when text is no longer restricted to W3C universal fontypes?  What happens when the visual becomes the markup instead of developers marking up the visual?  Things start to look WAYYY better, that&#8217;s what and it&#8217;s one of the first steps towads Web 3.0 in the design community.   So what about if users have javascript turned off in their browser?</p>
<blockquote cite="http://www.mikeindustries.com/blog/sifr/"><p>
sIFR snaps right in and lifts right out. This is an important point. Making the decision to use sIFR is often just a question of adding a .js include to your site, uploading a .swf and some .css files to your server, tuning your fonts, and that’s it. It generally doesn’t require any wholesale code or design changes, and should you decide at some point in the future that you don’t want to use it, simply remove the .js file and you’re back to browser text.</p>
</blockquote>
<p>Needless to say sIFR is pretty incredible.  You can read more about this new technology from the developers site at <a href="http://www.mikeindustries.com/blog/sifr/">http://mikeindustries.com</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d199" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/javascript/what-is-sifr-199/&amp;title=What+is+sIFR%3F" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/javascript/what-is-sifr-199/&amp;title=What+is+sIFR%3F" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/javascript/what-is-sifr-199/&amp;title=What+is+sIFR%3F" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/javascript/what-is-sifr-199/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing and Coding a Wordpress Theme From Scratch (Part 5)</title>
		<link>http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/</link>
		<comments>http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 04:48:59 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[cache]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[markup]]></category>

		<category><![CDATA[photoshop]]></category>

		<category><![CDATA[psd]]></category>

		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/</guid>
		<description><![CDATA[Going From Photoshop to XHTML to Wordpress Theme.  In this multi-part series I'll detail how to create and design a Wordpress theme in Photoshop and take it from just an idea to fully coded.
]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/">Image heavy websites</a> have one problem: load time.  So if you&#8217;re designing a Wordpress theme that relies heavily on images like one made in Photoshop, you want to do everything you can to increase speed.  a) You want the images to display as shortly after the text does as possible and b) you want to do everything to help users on slower connections.</p>
<p>One way to do this is with <a href="http://www.designcodeexecute.com/2008/04/09/javascript-preload-images-script/" target="_blank">javascript</a>, the other way is with <a href="http://www.netmechanic.com/news/vol6/css_no18.htm" target="_blank">CSS</a>.</p>
<p><span id="more-149"></span></p>
<p><b>Preloading Images with Javascript</b></p>
<p>Javascript is unfortunately abused all over the web.  It&#8217;s used for scripts that create pop-up ads, pop-under ads, and to change browser homepages.  So the only draw back to this approach is that some users have deliberately turned off javascript in their browsers to thwart abusers.  No big deal.  If the user has javascript turned off, the technique I&#8217;m about to share will be ignored and the page will load normally.</p>
<ol>
<li>So how is it done? In the folder that contains your index.html file and stylesheets, create a folder called &#8216;Scripts&#8217;. </li>
<li>Let&#8217;s create a blank document in the text editor and call it <strong>preload.js</strong></li>
<li>We&#8217;re going to create an array of calls for images that will start to load as soon as the head of the page loads.  List all the images you want to have &#8216;headstart&#8217; on loading here.  This can include images that are linked to on the page but that don&#8217;t appear on the page.  When dealing with a Photoshop design that is being marked up to XHTML you should place all the slices here.</li>
<li>Next you want to place the following code in the header section of your HTML document just after the &lt;title&gt; and &lt;meta&gt; tags.
<pre>
&lt;script type="text/javascript" src="scripts/preload.js"&gt; &lt;/script&gt;
</pre>
<p>This tells the HTML document to look for the script before the stylesheet and subsequently, to request the array of images the stylesheet needs to load.  Alternatively you could place the javascript inline but I prefer using external documents.
</li>
<li>The contents of the Javascript file should look like this:
<pre>
if (document.images)
{
preload_image = new Image();
img_path = new Array();	

   img1 = new Image();
   img2 = new Image();
   img3 = new Image();
   img4 = new Image();
   img5 = new Image();
   img6 = new Image();
   img7 = new Image();
   img8 = new Image();
   img9 = new Image();
   img10 = new Image();
   img11 = new Image();
   img12 = new Image();
   img1 = new Image();
   img1.src = "../images/yourimage_01.png";
   img2.src = "../images/yourimage_02.png";
   img3.src = "../images/yourimage_03.png";
   img4.src = "../images/yourimage_04.png";
   img5.src = "../images/yourimage_05.png";
   img6.src = "../images/yourimage_06.png";
   img7.src = "../images/yourimage_07.png";
   img8.src = "../images/yourimage_08.png";
   img9.src = "../images/yourimage_09.png";
   img10.src = "../images/yourimage_10.png";
   img11.src = "../images/yourimage_11.png";
   img12.src = "../images/yourimage_12.png";
   img13.src = "../image/yourimage_13.png";

for(var i = 0; i&lt;=img_path.length; i++)
preload_image.src = img_path[i];
}
</pre>
</li>
<li>That&#8217;s it.  You can use this to preload images for the next page, icons, or any number of things but the idea is to use it to call the array before they&#8217;re called elsewhere on the page.</li>
</ol>
<p><b>Preloading Images with CSS</b></p>
<p>Another method is to preload images in the stylesheet.  This method is fairly useless on the actual homepage but it can be used to preload all sorts of images on subsequent pages.  Lets look at the code:</p>
<pre>
     .hiddenPic {display:none;}
</pre>
<p>This class should be placed somewhere in your stylesheet.  You can place it inline in your html document and it would look like this:</p>
<pre>
     &lt;style type="text/css"&gt;
     .hiddenPic {display:none;}
     &lt;/style&gt;
</pre>
<p>Next, at the <strong>bottom</strong> of your html page just before the &lt;/body&gt; closing tag, we need to call all the images from the next page we want preloaded and apply the <strong>.hiddenPic</strong> class:</p>
<pre>
     &lt;img src="yourimage.jpg" alt="" title="" height="" width="" class="hiddenPic"&gt;

     &lt;img src="yourimage01.jpg" alt="" title="" height="" width="" class="hiddenPic"&gt;

     &lt;img src="yourimage02.jpg" alt="" title="" height="" width="" class="hiddenPic"&gt;

&lt;/body&gt;
</pre>
<p>How does it work?  Essentially you&#8217;re calling the images when the browser reads the page and hiding them before they are ever displayed with the <strong>display:none;</strong> line.  The idea is that the browser downloads the images and caches them anyways so that when the user clicks through to the next page the users browser will note that the images being requested have already been cached and won&#8217;t waste time downloading them again.</p>
<p>Now that load time has been reduced, in Part 6 we&#8217;ll get back to marking up our XHTML to PHP and developing our Wordpress theme.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d149" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+5%29" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+5%29" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+5%29" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Understanding Scripting in Photoshop</title>
		<link>http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/</link>
		<comments>http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 18:19:35 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[photoshop]]></category>

		<category><![CDATA[script]]></category>

		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/</guid>
		<description><![CDATA[Whether you want to automate tedious tasks, customize commands, or add new features, scripting takes the world of Photoshop to another level.  In this tutorial I&#8217;ll make you aware of what scripts are capable, where to find them, how to edit them and how to use them.  Eventually I&#8217;ll follow up with how [...]]]></description>
			<content:encoded><![CDATA[<p>Whether you want to automate tedious tasks, customize commands, or add new features, scripting takes the world of Photoshop to another level.  In this tutorial I&#8217;ll make you aware of what scripts are capable, where to find them, how to edit them and how to use them.  Eventually I&#8217;ll follow up with how to make your own scripts but for now that&#8217;s a topic for another day.</p>
<p>If you use Photoshop on a daily basis you&#8217;ve probably found yourself doing the same tasks over and over again and it would be nice to have the ability to automate those things to save yourself some time, right? Well scripts make that just a tad bit easier.</p>
<p>First things first, to speed up your understanding of scripting, you should probably download some existing scripts from the various repositories and websites that offer them. Here&#8217;s a list of places that offer free Adobe scripts for Photoshop and other Adobe products.</p>
<p><a href="http://www.adobe.com/cfusion/exchange/index.cfm?s=5&#038;from=1&#038;o=desc&#038;cat=203&#038;l=-1&#038;event=productHome&#038;exc=16" title="adobe exchange" target="_blank">Adobe Exchange Repository</a></p>
<p><a href="http://www.ps-scripts.com/bb/">Ps-Scripts</a></p>
<p>Graphicsoft</p>
<p>You may have noticed that some of these sites offer &#8216;Actions&#8217; as well and you might be asking yourself, how does an &#8216;action&#8217; differ from a &#8217;script&#8217;?   Actions (in Photoshop) are a means to record all commands used to generate an effect in Photoshop for the purpose of re-application later. Many people  say that scripts are similar to actions because they can both be used to automate tasks, but scripts can do so much more then what was possible with actions. For starters scripts have conditional logic which makes it possible to automate different outcomes based on various inputs.  Essentially scripting Photoshop is programming and thus it uses various programming languages for results.</p>
<p>So what can you do with scripts?  A few examples are using Photoshop to snatch frame grabs from a <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&#038;loc=en_us&#038;extid=1479020" target="_blank">video source</a>, turning a photo into <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&#038;loc=en_us&#038;extid=1446018" target="_blank">a rainy day</a> or to <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&#038;loc=en_us&#038;extid=1044428" target="_blank">turn RGB values in an image into swatches</a> automatically.</p>
<p>For the purposes of this tutorial I&#8217;ll only deal with JavaScript since it is platform independent (Mac and Windows). Also available are Visual Basic  (Windows) and AppleScript (Mac) commands.</p>
<h1>Adding and Using Scripts</h1>
<ul>
<li>After downloading scripts you&#8217;ll need to install by navigating to <strong>Applications &gt;&gt; Adobe Photoshop CS2 &gt;&gt; Presets &gt;&gt; Scripts</strong>.</li>
<li>Drop your file into the &#8216;Scripts&#8217; folder and launch (or relaunch) Photoshop.</li>
<li>Open your image in Photoshop.</li>
<p><img></p>
<li>Select <strong>File &gt; Scripts</strong> and select the script you wish to use.</li>
<p><img src="http://farm3.static.flickr.com/2159/2438459113_af095437a5_m.jpg"></p>
<li>A dialog window may pop open asking if you want to apply the script.  Click &#8216;yes&#8217;.</li>
<p><img src="http://farm3.static.flickr.com/2159/2438459239_2a055444a8_m.jpg">
</ul>
<p>Bam you&#8217;re done.  Scripting is really that easy.  Now for the harder part.</p>
<p><b>Writing or Editing Scripts</b></p>
<p>Regardless of whether you install a single CS3 application or the entire Creative Suite, two other applications are installed by default: Adobe Bridge  and the ExtendScript Toolkit. The ExtendScript Toolkit is a coding environment that aims to allow you to add new features to Adobe products through scripting.</p>
<ul>
<li>Find the ExtendScript Toolkit. Go to <strong>Applications &gt;&gt; Utilities &gt;&gt; Adobe Utilities &gt;&gt; ExtendScript Toolkit2</strong>. In some rare cases this may not have been installed or deleted.  No worries, the toolkit can be downloaded for <a href="http://www.adobe.com/support/downloads/detail.jsp?ftpID=3206" target="_blank">Macs here</a> and <a href="http://www.adobe.com/support/downloads/product.jsp?product=111&#038;platform=Windows" target="_blank">PCs here</a>.</li>
<p><img src="http://farm3.static.flickr.com/2343/2438457453_61a172693e.jpg"></p>
<li>You&#8217;ll see a window with Photoshop-like palettes on the left and a text editor on the right.</li>
<li>Choose <strong>File &gt; New JavaScript</strong>. This will create a blank file with an area on the right ready for you to type. If you&#8217;re editing a script, instead of creating a new file you would simply open that script instead.</li>
<li>Understanding the window in front of you is critical.  First, the <em>&#8216;Select Target Application&#8217;</em> option tells ExtendScript which application you are writing the script for. In the top left dropdown menu select Adobe Photoshop CS2 or 3 (depending on your version). When asked if you want to start the application, choose &#8216;yes&#8217;.</li>
<li>If you aren&#8217;t familiar with scripting or you&#8217;d like a reference guide, download the <a href="http://partners.adobe.com/public/developer/photoshop/sdk/index_scripting.html">Photoshop JavaScript Reference Guide</a>.
</ul>
<p>This concludes our tutorial.  Stay tuned to this column because in a future lesson I&#8217;ll help you go beyond these steps to actually writing and creating your own scripts from scratch.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d131" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/&amp;title=Understanding+Scripting+in+Photoshop" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/&amp;title=Understanding+Scripting+in+Photoshop" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/&amp;title=Understanding+Scripting+in+Photoshop" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Yahoo! UI File Uploader Library</title>
		<link>http://www.developertutorials.com/blog/javascript/yahoo-ui-file-uploader-library-127/</link>
		<comments>http://www.developertutorials.com/blog/javascript/yahoo-ui-file-uploader-library-127/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 19:56:13 +0000</pubDate>
		<dc:creator>Omi Azad</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[Flickr Like FIle Uploader]]></category>

		<category><![CDATA[Library]]></category>

		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/javascript/yahoo-ui-file-uploader-library-127/</guid>
		<description><![CDATA[The web developers who use Flickr always dream about a file uploader on their site like Flickr, which will upload multiple files  together and show the upload status simultaneously. One of my developer friend  told me that the feature will be added on PHP6 where a multithread data transfer  and file uploaded [...]]]></description>
			<content:encoded><![CDATA[<p>The web developers who use Flickr always dream about a file uploader on their site like Flickr, which will upload multiple files  together and show the upload status simultaneously. One of my developer friend  told me that the feature will be added on PHP6 where a multithread data transfer  and file uploaded data status on server will happen simultaneously. In that case when user will upload a file through a PHP6 script, a file upload status can be displayed at the same time.</p>
<p>But Developers doesn&#8217;t need to wait for PHP6 for this feature because YUI JavaScript Framework 2.51 added this Flickr like file  upload feature (though it&#8217;s experimental inclusion). </p>
<p>Let&#8217;s have a look at the component&#8217;s features-</p>
<ol>
<li>  Multiple file selection in a single &#8220;Open File&#8221; dialog.</li>
<li>File extension filters to facilitate the user&#8217;s  selection.</li>
<li>Progress tracking for file uploads.</li>
<li>A range of file metadata: filename, size, date  created, date modified, and author.</li>
<li>A set of events dispatched on various aspects of the  file upload process: file selection, upload progress, upload completion, etc.</li>
<li>Inclusion of additional data in the file upload POST  request.</li>
<li>Faster file upload on broadband connections due to the  modified SEND buffer size.</li>
<li>Same-page server response upon completion of the file  upload.</li>
</ol>
<p>Beside JavaScript and Cookie support, the users also need  Adobe Flash Player support in their browser to use the feature.</p>
<p>YUI Home Page: <a href="http://developer.yahoo.com/yui/" target="_blank">http://developer.yahoo.com/yui/</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d127" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/javascript/yahoo-ui-file-uploader-library-127/&amp;title=Yahoo%21+UI+File+Uploader+Library" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/javascript/yahoo-ui-file-uploader-library-127/&amp;title=Yahoo%21+UI+File+Uploader+Library" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/javascript/yahoo-ui-file-uploader-library-127/&amp;title=Yahoo%21+UI+File+Uploader+Library" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/javascript/yahoo-ui-file-uploader-library-127/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jQuery: Interaction Design for PHP Developers</title>
		<link>http://www.developertutorials.com/blog/javascript/jquery-interaction-design-for-php-developers-16/</link>
		<comments>http://www.developertutorials.com/blog/javascript/jquery-interaction-design-for-php-developers-16/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 06:18:51 +0000</pubDate>
		<dc:creator>Akash Mehta</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[js frameworks]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/javascript/jquery-interaction-design-for-php-developers-16/</guid>
		<description><![CDATA[It doesn&#8217;t advertise itself as such, but the jQuery JS framework is quite possibly one of the best JS frameworks for PHP developers. Most of the frameworks out there are designed for developers with JavaScript experience, and understandibly so. But when I first started using jQuery, my JavaScript experience was something along the lines of [...]]]></description>
			<content:encoded><![CDATA[<p>It doesn&#8217;t advertise itself as such, but the jQuery JS framework is quite possibly one of the best JS frameworks for PHP developers. Most of the frameworks out there are designed for developers with JavaScript experience, and understandibly so. But when I first started using jQuery, my JavaScript experience was something along the lines of &#8220;take the dollar symbol out and your PHP is magically syntactically valid JS&#8221;. (Pitiful, I know.)</p>
<p>The main advantage of jQuery for us PHP developers is that it utilises our existing knowledge. When PHP code brings you closer to the HTML and other UI needs - CSS, for instance, - jQuery leverages that knowledge. It takes a little while to get used to functional programming, of course, but with CSS selectors, basic method chaining, and an approach to event handling that just works, jQuery is an ideal framework for PHP developers getting started with JavaScript interaction design.</p>
<p>So, next time you&#8217;re looking to get your hands dirty with DOM, DHTML and AJAX, head over to jQuery.com and give it a go.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d16" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/javascript/jquery-interaction-design-for-php-developers-16/&amp;title=jQuery%3A+Interaction+Design+for+PHP+Developers" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/javascript/jquery-interaction-design-for-php-developers-16/&amp;title=jQuery%3A+Interaction+Design+for+PHP+Developers" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/javascript/jquery-interaction-design-for-php-developers-16/&amp;title=jQuery%3A+Interaction+Design+for+PHP+Developers" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/javascript/jquery-interaction-design-for-php-developers-16/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
