<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.2" -->
<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/"
	>

<channel>
	<title>Some tricks</title>
	<link>http://www.sometricks.com</link>
	<description>Tricks for web designers and developers</description>
	<pubDate>Wed, 23 Aug 2006 07:24:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>
	<language>en</language>
			<item>
		<title>Fade effect</title>
		<link>http://www.sometricks.com/2006/05/04/fade-effect/</link>
		<comments>http://www.sometricks.com/2006/05/04/fade-effect/#comments</comments>
		<pubDate>Thu, 04 May 2006 17:40:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
	<category>Javascript</category>
		<guid isPermaLink="false">http://www.sometricks.com/2006/05/04/fade-effect/</guid>
		<description><![CDATA[
Recently I have seen a nice effect that makes HTML elements to fade from one color to another.
You can see what I mean here, just click the next link:

CLICK HERE TO SEE WHAT I MEAN!
&#8212;&#8211; Watch me fade &#8212;&#8211;
The solution:
1) Searching on Internet I found that there is a technique called Yellow Fade technique that [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>Recently I have seen a nice effect that makes HTML elements to fade from one color to another.<br />
You can see what I mean here, just click the next link:</p>
<p><script type="text/javascript" src="http://www.sometricks.com/archives/fade/fat.js"></script></p>
<p><a href="javascript:Fat.fade_element('firstdiv', 60, 3000, '#FFFF33', '#f8f8f8')">CLICK HERE TO SEE WHAT I MEAN!</a></p>
<div id="firstdiv">&#8212;&#8211; Watch me fade &#8212;&#8211;</div>
<p><strong>The solution:</strong><br />
1) Searching on Internet I found that there is a technique called <a href="http://www.37signals.com/svn/archives/000558.php">Yellow Fade technique</a> that makes this effect.</p>
<p>2) But there is another improved technique called <a href="http://www.axentric.com/posts/default/7">Fade Anything Technique</a> that is better. It lets you fade from any color, decide how many frames per second you want and choose the duration of the effect.</p>
<p>2.1) <strong>Simple use of Fade Anything Technique</strong>:</p>
<p>Download the <a href="http://www.sometricks.com/archives/fade/fat.js">fat.js</a> script and include it in your website:</p>
<pre class= "code"><code>&lt;script type="text/javascript" src=" fat.js"&gt;&lt;/script&gt;</code></pre>
<p>Choose an element like a <strong>DIV </strong>and give it the class &#8220;<strong>fade</strong>&#8220;:</p>
<pre class= "code"><code>&lt;div id="mydiv" class="fade"&gt;Fade it!&lt;/div&gt;</code></pre>
<p>The DIV element will fade from the default yellow color #FFFF33 to its original background color.</p>
<p>2.2) <strong>Advanced use of Fade Anything Technique</strong>:</p>
<p>- Change the default fade from color:</p>
<pre class= "code"><code>&lt;div id="mydiv" class="fade-0066FF"&gt;Blue fade&lt;/div&gt;</code></pre>
<p>- Fade an element using the function <strong>Fat.fade_element()</strong> :</p>
<p>The <strong>Fat.fade_element()</strong> function accepts some arguments: target ID, frames per second, fade duration, fade color, final color.</p>
<p><strong>Example</strong>: fade DIV from red to green at 60 frames per second for 5 seconds:</p>
<pre class= "code"><code >&lt;a href="javascript:Fat.fade_element('mydiv', 60, 5000, '#FF0000', '#00CC00')"&gt;CLICK HERE&lt;/a&gt;

</code></pre>
<p><a href="javascript:Fat.fade_element('mydiv', 60, 5000, '#FF0000', '#00CC00')">CLICK HERE TO FADE FROM RED TO GREEN!</a></p>
<div id="mydiv">&#8212;&#8211; Watch me fade red to green &#8212;&#8211;</div>
<p>As you see  is easy to make your own fade effects with this nice script!</p>
<p><strong>Links</strong>:</p>
<p>- For more detailed information visit the <a href="http://www.axentric.com/posts/default/7">Fade Anything Technique website</a> </p>
<p>- For the original fade technique visit <a href="http://www.37signals.com/svn/archives/000558.php">Yellow Fade Technique website</a></p>
<p>- And I have also found an <a href="http://weblog.masukomi.org/index.pl/view/fade%20anything%20technique">improved Fade Anything Technique </a> that says to work well in Safari, but I could not test it.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.sometricks.com/2006/05/04/fade-effect/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>FlashObject is now SWFObject</title>
		<link>http://www.sometricks.com/2006/04/26/flashobject-is-now-swfobject/</link>
		<comments>http://www.sometricks.com/2006/04/26/flashobject-is-now-swfobject/#comments</comments>
		<pubDate>Wed, 26 Apr 2006 13:49:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
	<category>Flash</category>
		<guid isPermaLink="false">http://www.sometricks.com/2006/04/26/flashobject-is-now-swfobject/</guid>
		<description><![CDATA[
Some days ago i recommended the FlashObject in the post Eolas Fix for Flash: FlashObject 
Due to legal problems with Adobe, Geoff Stearns has to change the name of FlashObject to SWFObject, you can read the whole story here: FlashObject to become SWFObject
And now you can download a new version with some small changes:
SWFObject, née [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>Some days ago i recommended the FlashObject in the post <a href="http://www.sometricks.com/2006/04/23/best-eolas-fix-for-flash-flashobject">Eolas Fix for Flash: FlashObject</a> </p>
<p>Due to legal problems with Adobe, Geoff Stearns has to change the name of <strong>FlashObject </strong>to <strong>SWFObject</strong>, you can read the whole story here: <a href="http://blog.deconcept.com/2006/04/21/flashobject-to-become-swfobject/">FlashObject to become SWFObject</a></p>
<p>And now you can download a new version with some small changes:</p>
<p><a href="http://blog.deconcept.com/2006/04/24/swfobject-nee-flashobject-1-4-released/">SWFObject, née FlashObject 1.4 released</a>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.sometricks.com/2006/04/26/flashobject-is-now-swfobject/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Force download for PDF, JPG, GIF directly from the web browser</title>
		<link>http://www.sometricks.com/2006/04/23/download-pdf-jpg-gif-directly-from-the-web-browser/</link>
		<comments>http://www.sometricks.com/2006/04/23/download-pdf-jpg-gif-directly-from-the-web-browser/#comments</comments>
		<pubDate>Sun, 23 Apr 2006 17:41:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
	<category>HTML</category>
		<guid isPermaLink="false">http://www.sometricks.com/2006/04/23/download-pdf-jpg-gif-directly-from-the-web-browser/</guid>
		<description><![CDATA[
When a user clicks on a link to a JPG file, PDF file and other kind of files from a website, the web browser normally open the file inside it. This sometimes is annoying, for example, when the browser opens a PDF file this make the computer works slowly while the PDF loads. Another reason [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>When a user clicks on a link to a JPG file, PDF file and other kind of files from a website, the web browser normally open the file inside it. This sometimes is annoying, for example, when the browser opens a PDF file this make the computer works slowly while the PDF loads. Another reason this is annoying is that maybe you want to store the files on your computer and use or read later.</p>
<p>Some webmasters try to avoid this problem and force download using .zip files, but this is not an elegant solution.</p>
<p>There is a better method to achieve this with the help of <strong>PHP </strong>using HEADER and READFILE commands.</p>
<p>Here you have an example:</p>
<p><a href="http://www.sometricks.com/archives/downloadpicture/download.html">Example</a></p>
<p>The PHP code that process all is: </p>
<pre class= "code">
<code>&lt;?
$file = $_GET['file'];
header ("Content-type: octet/stream");
header ("Content-disposition: attachment; filename=".$file.";");
header("Content-Length: ".filesize($file));
readfile($file);
exit;
?&gt;</code></pre>
<p>And the HTML link is: </p>
<pre class= "code">
<code >&lt;a href="process.php?file=picture.jpg"&gt;Download JPG image&lt;/a&gt;</code></pre>
<p>As you see, the only thing you must do is upload the PHP file to your site and then call it and add the file name to the PHP URL.<br />
Note: the JPG file must be on the same folder as the PHP file.</p>
<p>This trick is usefull for any kind of file: JPG, GIF, PDF, etc. and work in almost all web browsers.</p>
<p>If you want to download the example files, just do it <a href="http://www.sometricks.com/archives/downloadpicture/downloadjpg.zip">HERE</a></p>
<p>Simple, but effective!</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.sometricks.com/2006/04/23/download-pdf-jpg-gif-directly-from-the-web-browser/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Eolas Fix for Flash: FlashObject</title>
		<link>http://www.sometricks.com/2006/04/23/best-eolas-fix-for-flash-flashobject/</link>
		<comments>http://www.sometricks.com/2006/04/23/best-eolas-fix-for-flash-flashobject/#comments</comments>
		<pubDate>Sun, 23 Apr 2006 12:46:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
	<category>Flash</category>
		<guid isPermaLink="false">http://sometricks-com.how-to-get-a-website.com/2006/04/23/best-eolas-fix-for-flash-flashobject/</guid>
		<description><![CDATA[ 
Some news appeared a couple of years ago about the Eolas-Microsoft patent issue: W3C sides with Microsoft against Eolas patent 
On April 11, 2006 Microsoft was finally forced to update how ActiveX plug-ins behave in Internet Explorer via Windows Update.
So now if you use Internet Explorer and go to a website that has ActiveX [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--> </p>
<p>Some news appeared a couple of years ago about the Eolas-Microsoft patent issue: <a href="http://www.infoworld.com/article/03/10/29/HNmsversuspatent_1.html">W3C sides with Microsoft against Eolas patent </a></p>
<p>On April 11, 2006 Microsoft was finally forced to update how ActiveX plug-ins behave in Internet Explorer via Windows Update.</p>
<p>So now if you use Internet Explorer and go to a website that has ActiveX elements (like Flash) inside you will see a tooltip that says: &#8220;Click to activate and use this control&#8221;.<br />
Now ActiveX elements will not be initially allowed to interact with the user until he/she enables the ActiveX clicking the ActiveX element or pressing Spacebar or Enter. </p>
<p>Fortunately there are some fixes that use Javascript to show the ActiveX information directly. I strongly recommed to use the <strong>FlashObject</strong> library of Geoff Stearns.<br />
It fix the problem in a nice way and also has other good features:</p>
<ul>
<li>The script can detect the Flash plug-in in all major web browsers (on Mac and PC).</li>
<li>Is designed to make embedding Flash movies as easy as possible.</li>
<li>It is also very search engine friendly and can be used in valid HTML and XHTML 1.0 documents.</li>
</ul>
<p><strong>How to use:</strong></p>
<ol>
<li>Include in your website the <strong>flashobject.js</strong> Javascript file that you can download <a href="http://blog.deconcept.com/flashobject/#download">HERE</a>.</li>
<li>Then write some Javascript on your page to embed your Flash movie.
<p><strong>Example:</strong></p>
<pre class= "code">
<code>&lt;script type="text/javascript" src="flashobject.js"&gt;&lt;/script&gt;
&lt;div id="flashcontent"&gt;
  This text is replaced by the Flash movie.
&lt;/div&gt;
&lt;script type="text/javascript"&gt;
   var fo = new FlashObject("movie.swf", "mymovie", "200", "100", "7", "#336699");
   fo.write("flashcontent");
&lt;/script&gt;</code></pre>
</li>
<li>The parameters are simple:
<p><strong>swf</strong>: the file path and name to your swf file.<br />
<strong>id</strong>: the ID of your object or embed tag.<br />
<strong>width</strong>: width of your Flash movie.<br />
<strong>height</strong>- height of your Flash movie.<br />
<strong>version</strong>: required player version for your Flash content.<br />
<strong>background color</strong>: the hex value of the background color of your Flash movie.</li>
</ol>
<p><strong>And that&#8217;s all!</strong><br />
Now your flash movies will show in the same way as before and users don&#8217;t have to make any extra click or activation.</p>
<p>If you need more information just visit the author&#8217;s website: <a href="http://blog.deconcept.com/flashobject/">FlashObject: Javascript Flash detection and embed script</a></p>
<p>So I recommend webmasters to fix their websites to work well on Internet Explorer.</p>
<p>And for normal users and web surfers I strongly recommend to download Firefox because this web browser doesn&#8217;t have this annoying problem.<br />
<strong>Another good reason to use Firefox.</strong></p>
<p>You can download Firefox at the link below:</p>
<p><!--adsense#firefox-->
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.sometricks.com/2006/04/23/best-eolas-fix-for-flash-flashobject/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
