<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Dynamic Drive Forums - Blogs</title>
		<link>http://www.dynamicdrive.com/forums/blog.php</link>
		<description>Dynamic Drive help forum</description>
		<language>en</language>
		<lastBuildDate>Sun, 22 Nov 2009 04:39:56 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>10</ttl>
		<image>
			<url>http://www.dynamicdrive.com/forums/images/misc/rss.jpg</url>
			<title>Dynamic Drive Forums - Blogs</title>
			<link>http://www.dynamicdrive.com/forums/blog.php</link>
		</image>
		<item>
			<title>Prevent users to open a video on the video-providing site (in a new window)</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=39</link>
			<pubDate>Thu, 19 Nov 2009 09:51:12 GMT</pubDate>
			<description><![CDATA[Inserting these two lines to your include code for video's: 
 
<param name="allowScriptAccess" value="never"> 
<param name="allowNetworking" value="internal"> 
 
prevents flash apps from running scripts or having outbound links. 
 
This is a very handy method for preventing users to open the video...]]></description>
			<content:encoded><![CDATA[<div>Inserting these two lines to your include code for video's:<br />
<br />
&lt;param name=&quot;allowScriptAccess&quot; value=&quot;never&quot;&gt;<br />
&lt;param name=&quot;allowNetworking&quot; value=&quot;internal&quot;&gt;<br />
<br />
prevents flash apps from running scripts or having outbound links.<br />
<br />
This is a very handy method for preventing users to open the video on the video-providing site (in a new window) when they accidentally click on the video screen.<br />
<br />
Demo <a href="http://www.let.rug.nl/molendyk/includeVideoNoLinkToProvider/includeVideoNoLinkToProvider.html" target="_blank">HERE</a> (a click on the playing video will not cause it to open in a new window, but will simply pause it).<br />
<br />
Arie Molendijk.</div>

]]></content:encoded>
			<dc:creator>molendijk</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=39</guid>
		</item>
		<item>
			<title>Document Resizer</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=38</link>
			<pubDate>Sat, 31 Oct 2009 23:50:03 GMT</pubDate>
			<description><![CDATA[Just a little script I made to make the document size bigger. :) 
 
---Quote (Originally by Nile)--- 
Ok: 
 
Code: 
--------- 
<html> 
<head> 
<title>Javascript Document Resizer</title>]]></description>
			<content:encoded><![CDATA[<div>Just a little script I made to make the document size bigger. :)<br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2" style="border:1px inset">
			
				<div>
					Originally Posted by <strong>Nile</strong>
					<a href="showthread.php?p=209224#post209224" rel="nofollow"><img class="inlineimg" src="images/buttons/viewpost.gif" border="0" alt="View Post" /></a>
				</div>
				<div style="font-style:italic">Ok:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 498px;
		text-align: left;
		overflow: auto">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Javascript Document Resizer&lt;/title&gt;
<code style="background-color: #FFFFBB">&lt;script type=&quot;text/javascript&quot;&gt;
<font color="Red">// Made by Nile
//UnlinkThis.net
//This credit tag must not be removed!</font>
<font color="navy"><b><i>var</i></b></font> size = <font color="navy"><b><i>new</i></b></font> Array<b>(</b><font color="grey">&quot;XSmall&quot;</font>, <font color="grey">&quot;Small&quot;</font>, <font color="grey">&quot;Medium&quot;</font>, <font color="grey">&quot;Lage&quot;</font>, <font color="grey">&quot;XLarge&quot;</font>, <font color="grey">&quot;XXLarge&quot;</font><b>)</b>;
<font color="navy"><b><i>var</i></b></font> reSize = <font color="navy"><b><i>function</i></b></font><b>(</b>size<b>)</b>{
document.body.style.zoom = screen.width/size;
};  
&lt;/script&gt;</code>
&lt;/head&gt;
&lt;body&gt;
&lt;img src=&quot;http://puppywar.com/images/cards/31309.jpg&quot; /&gt;&lt;img src=&quot;http://www.classact.ca/RubberStamps/Dogs/D06B_B_Large%20Dog%20Paw.jpg&quot; /&gt;&lt;br /&gt;
&lt;h1&gt;HTML Ipsum Presents&lt;/h1&gt;
	       
&lt;p&gt;&lt;strong&gt;Pellentesque habitant morbi tristique&lt;/strong&gt; senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. &lt;em&gt;Aenean ultricies mi vitae est.&lt;/em&gt; Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, &lt;code&gt;commodo vitae&lt;/code&gt;, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. &lt;a href=&quot;#&quot;&gt;Donec non enim&lt;/a&gt; in turpis pulvinar facilisis. Ut felis.&lt;/p&gt;
	       
&lt;ol&gt;
   &lt;li&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&lt;/li&gt;
   &lt;li&gt;Aliquam tincidunt mauris eu risus.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.&lt;/p&gt;&lt;/blockquote&gt;

&lt;ul&gt;
   &lt;li&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&lt;/li&gt;
   &lt;li&gt;Aliquam tincidunt mauris eu risus.&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;
#header h1 a { 
	display: block; 
	width: 300px; 
	height: 80px; 
}
&lt;/code&gt;&lt;/pre&gt;
<code style="background-color: #FFFFBB">&lt;div id=&quot;zoomer&quot;&gt;
&lt;input type=&quot;button&quot; value=&quot;Small&quot; onclick=&quot;reSize(screen.width+100)&quot;/&gt;&lt;input type=&quot;button&quot; value=&quot;Medium&quot; onclick=&quot;reSize(screen.width)&quot;/&gt;&lt;input type=&quot;button&quot; value=&quot;Large&quot;  onclick=&quot;reSize(1100)&quot;/&gt;&lt;input type=&quot;button&quot; value=&quot;XLarge&quot;  onclick=&quot;reSize(1000)&quot;/&gt;
&lt;/div&gt;</code></pre>
</div>The highlighted are the parts you need. Place the first highlighted text into the <code style="background-color: #FFFFBB">&lt;head&gt;</code> part of your document, and the second highlighted text in any part of the <code style="background-color: #FFFFBB">&lt;body&gt;</code> tag in your document you want.</div>
			
		</td>
	</tr>
	</table>
</div></div>

]]></content:encoded>
			<dc:creator>Nile</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=38</guid>
		</item>
		<item>
			<title>Combining Ultimate Fade-in Slideshow 2.1 and Lightwindow 2.0</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=37</link>
			<pubDate>Wed, 07 Oct 2009 15:10:41 GMT</pubDate>
			<description><![CDATA[I've found that this actually can work.  It makes an interesting use of the slide show's undocumented oninit feature, and how well the slide show is written visa vis jQuery's No Conflict mode.  I would generally advise using two scripts which work off of the same script library, rather than two...]]></description>
			<content:encoded><![CDATA[<div>I've found that this actually can work.  It makes an interesting use of the slide show's undocumented oninit feature, and how well the slide show is written visa vis jQuery's No Conflict mode.  I would generally advise using two scripts which work off of the same script library, rather than two different script libraries.  However, in this case both scripts are so robust, who can resist?<br />
<br />
That said, all you need to do to set up a demo is to follow the instructions for Ultimate Fade on its demo page.  Then replace the second slide show's script code with this script code (additions/changes highlighted):<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 450px;
		text-align: left;
		overflow: auto">var mygallery2=new fadeSlideShow({
	wrapperid: &quot;fadeshow2&quot;, //ID of blank DIV on page to house Slideshow
	dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		[&quot;http://i26.tinypic.com/11l7ls0.jpg&quot;, &quot;<code style="background-color: #FFFFBB">http://stickmanlabs.com/images/kevin_vegas.jpg&quot;</code>, &quot;<code style="background-color: #FFFFBB">lightwindow::true::title::Waiting for the show to start in Las Vegas::author::Jazzmatt::caption::Mmmmmm Margaritas! And yes, this is me...</code>&quot;, &quot;Nothing beats relaxing next to the pool when the weather is hot.&quot;],
		[&quot;http://i29.tinypic.com/xp3hns.jpg&quot;, &quot;http://en.wikipedia.org/wiki/Cave&quot;, &quot;_new&quot;, &quot;Some day I'd like to explore these caves!&quot;],
		[&quot;http://i30.tinypic.com/531q3n.jpg&quot;],
		[&quot;http://i31.tinypic.com/119w28m.jpg&quot;, &quot;&quot;, &quot;&quot;, &quot;What a beautiful scene with everything changing colors.&quot;] //&lt;--no trailing comma after very last image element!
	],
	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: &quot;always&quot;,
	togglerid: &quot;fadeshow2toggler&quot;
})

<code style="background-color: #FFFFBB">mygallery2.setting.oninit = function(){
	this.setting.$gallerylayers.find('a[target]').each(function(){
		var t = this.target.split('::'), o = {}, i = 2;
		if(t.length &gt; 1 &amp;&amp; t[0] === 'lightwindow' &amp;&amp; t[1] === 'true'){
			o.href = this.href;
			for(i; i &lt; t.length; ++i)
				o[t[i++]] = t[i];
			jQuery(this).bind('click', function(e){myLightWindow.activateWindow(o);if(e &amp;&amp; e.preventDefault){e.preventDefault();}else return false;});
		}
	});
};</code></pre>
</div>After the closing script tag for the above code, add your Lightwindow files, and make sure they are available to the page:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 114px;
		text-align: left;
		overflow: auto">	. . . 
&lt;/script&gt;
<code style="background-color: #FFFFBB">&lt;script type=&quot;text/javascript&quot; src=&quot;javascript/prototype.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;javascript/scriptaculous.js?load=effects&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;javascript/lightwindow.js&quot;&gt;&lt;/script&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;css/lightwindow.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;</code></pre>
</div>One other thing, you will need to up the z-indexes in the lightwindow.css file in three spots:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 210px;
		text-align: left;
		overflow: auto">#lightwindow_overlay {
	/* REQUIRED */
	display: none;
	visibility: hidden;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100px;
	z-index: <code style="background-color: #FFFFBB">10000</code>;
	/* REQUIRED */
}</pre>
</div>and:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 178px;
		text-align: left;
		overflow: auto">#lightwindow {
	/* REQUIRED */
	/* Of Note - The height and width of this element are set to 0px */
	display: none;
	visibility: hidden;
	position: absolute;
	z-index: <code style="background-color: #FFFFBB">10001</code>;
	line-height: 0px;
	/* REQUIRED */
}</pre>
</div>and:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 210px;
		text-align: left;
		overflow: auto">#lightwindow_loading {
	/* REQUIRED */
	height: 100%;
	width: 100%;
	top: 0px;
	left: 0px;
	z-index: <code style="background-color: #FFFFBB">10001</code>;
	position: absolute;
	/* REQUIRED */
	background-color: #f0f0f0;
	padding: 10px;
}</pre>
</div>After you've done these things, simply click on the first image in the second slide show and watch the Lightwindow open up.<br />
<br />
Demo (click on first image in second slide show):<br />
<br />
<a href="http://home.comcast.net/~jscheuer1/side/ufade21_lw2/" target="_blank">http://home.comcast.net/~jscheuer1/side/ufade21_lw2/</a><br />
<br />
Lightwindow Home:<br />
<br />
<a href="http://www.stickmanlabs.com/lightwindow/" target="_blank">http://www.stickmanlabs.com/lightwindow/</a><br />
<br />
Ultimate Fade Home:<br />
<br />
<a href="http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm" target="_blank">http://www.dynamicdrive.com/dynamici...nslideshow.htm</a></div>

]]></content:encoded>
			<dc:creator>jscheuer1</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=37</guid>
		</item>
		<item>
			<title><![CDATA[HTML 4.01 Strict Video Include & Chopping Parts from YouTube video's]]></title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=36</link>
			<pubDate>Sun, 27 Sep 2009 21:07:37 GMT</pubDate>
			<description><![CDATA[Perhaps many of you already knew this. I didn't. 
HTML 4.01 Strict Video Include: 
Code: 
--------- 
<!--[if IE]> 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" style="position:absolute;left:20%; top:20%; height:80%;width:80%"> 
<![endif]--> 
<!--[if !IE]><!--> 
<object...]]></description>
			<content:encoded><![CDATA[<div>Perhaps many of you already knew this. I didn't.<br />
HTML 4.01 Strict Video Include:<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 178px;
		text-align: left;
		overflow: auto">&lt;!--[if IE]&gt;
&lt;object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; style=&quot;position:absolute;left:20%; top:20%; height:80%;width:80%&quot;&gt;
&lt;![endif]--&gt;
&lt;!--[if !IE]&gt;&lt;!--&gt;
&lt;object type=&quot;application/x-shockwave-flash&quot; style=&quot;position:absolute;left:20%; top:20%; height:80%;width:80%&quot; data=&quot;http://swf.tubechop.com/tubechop.swf?vurl=rw1j0NsIIeE&amp;amp;start=164&amp;amp;end=199&amp;amp;cid=28051&quot; &gt;
&lt;!--&lt;![endif]--&gt;
&lt;param name=&quot;movie&quot; value=&quot;http://swf.tubechop.com/tubechop.swf?vurl=rw1j0NsIIeE&amp;amp;start=164&amp;amp;end=199&amp;amp;cid=28051&quot; &gt;
&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; &gt;
&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; &gt;
&lt;/object&gt;</pre>
</div>Chopping parts from YouTube video's. Including:<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">http://swf.tubechop.com/tubechop.swf?vurl=YouTube_ID&amp;amp;start=some_value&amp;amp;end=some_value</pre>
</div>Chopping parts from YouTube video's. Direct URL:<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">http://swf.tubechop.com/tubechop.swf?vurl=YouTube_ID&amp;start=some_value&amp;end=some_value</pre>
</div>Demo and explanations <a href="http://www.let.rug.nl/molendyk/include_video_strict_plus_chopped/video.html" target="_blank">HERE</a>.<br />
===<br />
Arie Molendijk</div>

]]></content:encoded>
			<dc:creator>molendijk</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=36</guid>
		</item>
		<item>
			<title>YouTube Chromeless Player</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=35</link>
			<pubDate>Wed, 26 Aug 2009 18:29:57 GMT</pubDate>
			<description><![CDATA[It's not directly obvious from this (http://code.google.com/intl/nl/apis/youtube/chromeless_example_1.html) how we can: 
- start a movie on page load (question asked by some people on different forums); 
- specify the dimensions and position of the movies in percentages; 
- make good use of the...]]></description>
			<content:encoded><![CDATA[<div>It's not directly obvious from <a href="http://code.google.com/intl/nl/apis/youtube/chromeless_example_1.html" target="_blank">this</a> how we can:<br />
- start a movie on page load (question asked by some people on different forums);<br />
- specify the dimensions and position of the movies in percentages;<br />
- make good use of the ytplayer functions.<br />
<br />
Autoplay: something like<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 114px;
		text-align: left;
		overflow: auto">function so_start()
{
loadNewVideo('lKq9_kk3Zbc', 20);
}
//IE needs some time
window.onload=setTimeout('so_start()',2000)</pre>
</div>Size of movie in percentages (sort of):<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 274px;
		text-align: left;
		overflow: auto">Something like:
var <font color="Red">width_of_movie</font>=screen.availWidth/1.33+&quot;px&quot;
var <font color="Red">height_of_movie</font>=screen.availHeight/1.79+&quot;px&quot;

and then:
// &lt;![CDATA[

     // allowScriptAccess must be set to allow the Javascript from one
     // domain to access the swf on the youtube domain
     var params = { allowScriptAccess: &quot;always&quot;, bgcolor: &quot;#cccccc&quot; };
     // this sets the id of the object or embed tag to 'myytplayer'.
     // You then use this id to access the swf and make calls to the player's API
     var atts = { id: &quot;myytplayer&quot; };
     swfobject.embedSWF(&quot;http://www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=ytplayer&quot;,
                        &quot;ytapiplayer&quot;, <font color="Red">width_of_movie</font>, <font color="Red">height_of_movie</font>, &quot;8&quot;, null, null, params, atts);
     //]]&gt;</pre>
</div>Left and top of movie:<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 178px;
		text-align: left;
		overflow: auto">&lt;div style=&quot;position:absolute;left:22%;top:10%;border:1px inset black&quot;&gt;
&lt;div id=&quot;ytapiplayer&quot; &gt;
You need Flash player 8+ and JavaScript enabled to view this video.
&lt;/div&gt;
&lt;!-- Buttons etc. for the movie --&gt;
&lt;div style=&quot;text-align: center; font-size:10px; border:1px outset silver; padding-bottom:3px; background:white;&quot;&gt;
&lt;a href=&quot;javascript<b></b>:void(0);&quot; onclick=&quot;play();&quot;&gt;&lt;img src='play.jpg' height='14' style='border:0' title='Play' alt=&quot;&quot;&gt;&lt;/a&gt;
etc.
&lt;/div&gt;
&lt;/div&gt;</pre>
</div>ytplayer functions in a menu:<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 66px;
		text-align: left;
		overflow: auto">&lt;a href=&quot;javascript<b></b>:void(0)&quot; onclick=&quot;loadNewVideo('yGYQtNAHbX4', 10)&quot;&gt;Mary Stuart&lt;br&gt;(direct start at 10 secs)&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href=&quot;javascript<b></b>:void(0)&quot; onclick=&quot;cueNewVideo('lKq9_kk3Zbc', 80)&quot;&gt;Zarathustra&lt;br&gt;(button start at 80 secs)&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href=&quot;javascript<b></b>:void(0)&quot; onclick=&quot;loadNewVideo('-o2lYktVy3I', 0)&quot;&gt;Lisitsa plays the piano&lt;/a&gt;</pre>
</div>DEMO <a href="http://www.let.rug.nl/molendyk/youtube6/youtube6.html" target="_blank">here</a>. See source for (manipulations of) other ytplayer functions, like the stop function (not so good in the original), functions for fast forward / backward, functions for going to the beginning / the end of the video.<br />
===<br />
Arie.</div>

]]></content:encoded>
			<dc:creator>molendijk</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=35</guid>
		</item>
		<item>
			<title>Using the Select Box as a Navigation Tool</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=34</link>
			<pubDate>Mon, 10 Aug 2009 00:04:54 GMT</pubDate>
			<description>If we want the select box to function as a genuine menu, then a click on a given option (of the select box) must give us the same range of possibilities as does a click on the items of a normal menu. So a click should allow us to go to a new page, to open a popup window, to produce an alert etc. 
...</description>
			<content:encoded><![CDATA[<div>If we want the select box to function as a genuine menu, then a click on a given option (of the select box) must give us the same range of possibilities as does a click on the items of a normal menu. So a click should allow us to go to a new page, to open a popup window, to produce an alert etc.<br />
<br />
We can achieve this with the help of a function that has the following general form:<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 146px;
		text-align: left;
		overflow: auto">var which=&quot;&quot;;
function DoSomethingWithOptionvalue(which) {
var optionValue = document.getElementById(which).options[document.getElementById(which).selectedIndex].value;
var optionValueWithSplit = optionValue.substring(0,[optionValue.indexOf('|')]);
var url = optionValue.substring(optionValue.indexOf('|')+1, optionValue.length);
if (optionValue==&quot;bla&quot;) {some function()}
if (optionValueWithSplit==&quot;blo&quot;) {some function()}
}</pre>
</div>For <i>if (optionValue==&quot;bla&quot;) {some function()}</i> and <i>if (optionValueWithSplit==&quot;blo&quot;) {some function()}</i> we could have, for instance:<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 98px;
		text-align: left;
		overflow: auto">if (optionValue==&quot;none&quot;) {}
else if (optionValue==&quot;alarm&quot;) {alert('This is an alert.')}
else if (optionValue==&quot;red background&quot;) {document.body.style.background='red'}
else if (optionValueWithSplit==&quot;popup&quot;) {window.open(url,'','toolbar=1, location=1, directories=1, status=1, menubar=1, scrollbars=1, resizable=1, width=600px, height=350px, top=50px, left=100px');}
else location.href=url</pre>
</div>which could operate on select boxes like the following<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 274px;
		text-align: left;
		overflow: auto">&lt;select size=&quot;0&quot; name=&quot;select1&quot; id=&quot;select1&quot; onchange=&quot;DoSomethingWithOptionvalue('select1')&quot; &gt;
&lt;option value=&quot;none&quot; selected &gt;Some text&lt;/option&gt;
&lt;optgroup label=&quot;Normal link&quot; &gt;
&lt;option value=&quot;page1.html&quot;&gt;Page 1&lt;/option&gt;
&lt;option value=&quot;page2.html&quot;&gt;Page 2&lt;/option&gt;
&lt;/optgroup&gt;
&lt;optgroup label=&quot;New window / popup&quot; &gt;
&lt;option value=&quot;popup|http://www.google.com&quot;&gt;Google in new window&lt;/option&gt;
&lt;/optgroup&gt;
&lt;optgroup label=&quot;Change background&quot; &gt;
&lt;option value=&quot;red background&quot;&gt;Make background red&lt;/option&gt;
&lt;/optgroup&gt;
&lt;optgroup label=&quot;Alert&quot; &gt;
&lt;option value=&quot;alarm&quot;&gt;Produce an alert&lt;/option&gt;
&lt;/optgroup&gt;
&lt;/select&gt;</pre>
</div>It is preferable to use a select box menu having size=&quot;0&quot; (or &quot;1&quot;, or no size at all, which is the same as size=&quot;0&quot;), because we want our menu to be able to appear outside of the control window over other windows and to stay within the visible part of the screen without having to do any specific scripting.<br />
<br />
It is also a good idea to anchor a select box (used as a navigation tool) to another element, which shows/hides the box when the mouse moves over the anchor (show) or out of it (hide). This gives us some freedom in positioning the select box on the screen.<br />
<br />
Showing a select box having 'display:none' is a simple matter. But hiding it in a proper way is another matter. Its complexity has to do with the fact that different browsers require different ways to hide select boxes. For instance, if, in the select tag, we put onmouseout=&quot;this.style.display='none'&quot;, then, if we move the mouse out of the select tag, the entire select box hides in non-IE - except Opera - and in IE&gt;6, but in IE6 and in Opera, only the first option (or the one having 'selected') goes away, etc.<br />
<br />
Fortunately, these crossbrowser problems can be overcome (added some lines ensuring that the select box 'maintains' its selected option):<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 498px;
		text-align: left;
		overflow: auto">Coding in the head:

//Div needed for showing and hiding select boxes. Background needed for IE6 (and possibly higher versions). We hide the background with opacity
document.write('&lt;div id=&quot;hider&quot; style=&quot;position:absolute; left:0; width:0%; height:0%; display:inline; z-index:2000; background:white; filter:alpha(opacity=0); opacity:.0&quot; onmousemove=&quot;style.height=\'0px\'; style.width=\'0px\'; hideAll()&quot;&gt;&lt;/div&gt;')

var which=&quot;&quot;;

/* This hides the selected option in non-Opera when the select box folds out, ensuring that you don't see the selected option twice. You have to give the selected option of each menu: class=&quot;dynamicStyle&quot;. Doesn't work in IE, and must not apply to Opera, because it would mess up the select box. */
if(!window.opera){
document.write('&lt;style type=&quot;text/css&quot;&gt;.dynamicStyle{display:none}&gt;&lt;\/style&gt;')
}

/* Needed to keep 'selected' intact. */
function selected(){
for (i=0;i&lt;document.getElementsByTagName('select').length; i++) {
document.getElementsByTagName('select').item(i).selectedIndex=0;
}
}
//The onload probably not needed; just a security measure
document.onload=selected;
document.onmouseover=selected;

//Focus needed for IE6
function focusIE6(){
if(/*@cc_on!@*/false){document.body.focus()}
}
document.onmouseover=focusIE6

function hide(tag,className) {
var els = document.getElementsByTagName(tag)
for (i=0;i&lt;els.length; i++) {
if (els.item(i).className == className){
els.item(i).style.display=&quot;none&quot;;
}
}
}

//This function requires class=&quot;selectbox&quot; for each select box
function hideAll()
{
hide('select','selectbox');
}

function showBox(which)
{
document.getElementById(which).selectedIndex=0;
document.getElementById(which).style.display='inline';
}

In the body:

//Anchor-button for first select box
&lt;span onmouseout=&quot;hideAll()&quot; &gt;
&lt;button onmouseover=&quot;showBox('select1')&quot;&gt;Item 1&lt;/button&gt;
&lt;/span&gt;

&lt;select size=&quot;0&quot; name=&quot;select1&quot; id=&quot;select1&quot; class=&quot;selectbox&quot; style=&quot;position:absolute;left:2%;margin-top:18px;display:none&quot; onmouseout=&quot;document.getElementById('hider').style.height='95%'; document.getElementById('hider').style.width='100%'&quot; onchange=&quot;DoSomethingWithOptionvalue('select1'); selectedIndex=0&quot; onmouseover=&quot;showBox('select1')&quot; &gt;

&lt;option value=&quot;none&quot; selected class=&quot;dynamicStyle&quot;&gt; Everything about item 1&lt;/option&gt;
...
other options
...
&lt;/select&gt;</pre>
</div><a href="http://molendijk.freei.me/NavigationWithSelect3/page1.html" target="_blank">HERE</a>'s a demo, with more details and explanations. In use <a href="http://www.let.rug.nl/molendyk/eendracht/index1.html" target="_blank">on this site</a> (where Danny Kaye conducts the New York Philharmonic).<br />
===<br />
Arie Molendijk.</div>

]]></content:encoded>
			<dc:creator>molendijk</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=34</guid>
		</item>
		<item>
			<title>All Levels Menu- top headers revealed onClick instead of onMouseover</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=33</link>
			<pubDate>Tue, 28 Jul 2009 16:36:55 GMT</pubDate>
			<description>*Original Script:* All Levels Navigational Menu v2.2 (http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/index.htm) 
 
*Changes:* This modified version of ddlevelsmenu.js causes the top level sub menus to be revealed onClick of the primary headers (instead of the default onMouseover). The...</description>
			<content:encoded><![CDATA[<div><b>Original Script:</b> <a href="http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/index.htm" target="_blank">All Levels Navigational Menu v2.2</a><br />
<br />
<b>Changes:</b> This modified version of ddlevelsmenu.js causes the top level sub menus to be revealed onClick of the primary headers (instead of the default onMouseover). The remaining sub levels are still revealed onMouseover like before.<br />
<br />
<b>Usage:</b> Just replace the original .js file with the modified one.</div>


<!-- attachments -->
	<div style="margin-top:10px">

		
		
		
		
			<fieldset class="fieldset">
				<legend>Attached Files</legend>
				<table cellpadding="0" cellspacing="3" border="0">
				<tr>
	<td><img class="inlineimg" src="http://www.dynamicdrive.com/forums/images/attach/js.gif" alt="File Type: js" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="http://www.dynamicdrive.com/forums/blog_attachment.php?attachmentid=7&amp;d=1248799012">ddlevelsmenu.js</a> (16.2 KB, 845 views)</td>
</tr>
				</table>
			</fieldset>
		

	</div>
<!-- / attachments -->
]]></content:encoded>
			<dc:creator>ddadmin</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=33</guid>
		</item>
		<item>
			<title>Compact Cookie Unit</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=32</link>
			<pubDate>Wed, 24 Jun 2009 00:50:26 GMT</pubDate>
			<description>Cookies are often confusing.  Much of the confusion can be eliminated if you know that all cookies are strings.  If you want to store an array, function, number, or an object in a cookie, you must convert it to a string before storage and upon retrieval change it back into the...</description>
			<content:encoded><![CDATA[<div>Cookies are often confusing.  Much of the confusion can be eliminated if you know that all cookies are strings.  If you want to store an array, function, number, or an object in a cookie, you must convert it to a string before storage and upon retrieval change it back into the object/array/function/number that it was.  Cookies are therefore best used for string storage and retrieval.  This unit doesn't pretend to eliminate all of the possible confusions that can arise from &quot;when and where in my code is the best place to set/read/delete the cookie&quot;.  However, it does greatly simplify those actions:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 258px;
		text-align: left;
		overflow: auto">var cookie = {
  set: function(n, v, d){ // cookie.set takes (name, value, optional_persist_days) - defaults to session if no days specified
    if(d){var dt = new Date(); 
      dt.setDate(dt.getDate() + d);
      d = '; expires=' + dt.toGMTString();}
  document.cookie = n + '=' + escape(v) + (d || '') + '; path=/';
  },
  get: function(n){ // cookie.get takes (name)
  var c = document.cookie.match('(^|;)\x20*' + n + '=([^;]*)');
  return c? unescape(c[2]) : null;
  },
  kill: function(n){ // cookie.kill takes (name)
  cookie.set(n, '', -1);
  }
};</pre>
</div>Usage is indicated in the comments.  For example, to set a cookie named 'bob' to a value of 'your uncle' to persist for 2 days:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">cookie.set('bob', 'your uncle', 2);</pre>
</div>To read said cookie (it will return its <b>string</b> value if set, null if not set) - no semicolon follows the example because it will most often be a part of an if or variable assignment statement.<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">cookie.get('bob')</pre>
</div>To wit:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 82px;
		text-align: left;
		overflow: auto">if(<code style="background-color: #FFFFBB">cookie.get('bob')</code>)
  <font color="Green">do one thing</font>
else
  <font color="#008000">do another thing</font></pre>
</div>To erase said cookie:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">cookie.kill('bob');</pre>
</div>That's it!</div>

]]></content:encoded>
			<dc:creator>jscheuer1</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=32</guid>
		</item>
		<item>
			<title>Dynamically minimizing a DHTML Window</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=31</link>
			<pubDate>Fri, 19 Jun 2009 21:46:29 GMT</pubDate>
			<description><![CDATA[*Original Script:* DHTML Window (http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm) 
 
By default the DHTML Window script can only be minimized by clicking on the "minimize" icon located on the upper right of the opened window. Someone asked on the forums if there's a way to do this...]]></description>
			<content:encoded><![CDATA[<div><b>Original Script:</b> <a href="http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm" target="_blank">DHTML Window</a><br />
<br />
By default the DHTML Window script can only be minimized by clicking on the &quot;minimize&quot; icon located on the upper right of the opened window. Someone asked on the forums if there's a way to do this dynamically, such as via a link instead. Well, certainly. Given the below example DHTML Window:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">var googlewin=dhtmlwindow.open(&quot;googlebox&quot;, &quot;iframe&quot;, &quot;http://images.google.com/&quot;, &quot;#1: Google Web site&quot;, &quot;width=590px,height=350px,resize=1,scrolling=1,center=1&quot;, &quot;recal&quot;)</pre>
</div>To dynamically &quot;minimize&quot; it, you can call the internal function:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">dhtmlwindow.minimize(googlewin.controls.firstChild, googlewin)</pre>
</div>where &quot;<code style="background-color: #FFFFBB">googlewin</code>&quot; in the above case is the variable assigned to the DHTML window when you opened it. The following creates a link that minimizes this window:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">&lt;a href=&quot;#&quot; onClick=&quot;dhtmlwindow.minimize(googlewin.controls.firstChild, googlewin)&quot;&gt;Minimize Window&lt;/a&gt;</pre>
</div></div>

]]></content:encoded>
			<dc:creator>ddadmin</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=31</guid>
		</item>
		<item>
			<title><![CDATA["Operation Aborted" error in IE when inserting new elements into the DOM, and fix]]></title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=30</link>
			<pubDate>Wed, 03 Jun 2009 19:48:28 GMT</pubDate>
			<description><![CDATA[The DOM lets you dynamically create and add elements to the page, such as the following, which creates an image on the fly and adds it to the end of the document: 
 
 
Code: 
--------- 
var img=document.createElement("img") 
img.setAttribute('src', 'dd.gif') 
document.body.appendChild(img)...]]></description>
			<content:encoded><![CDATA[<div>The DOM lets you dynamically create and add elements to the page, such as the following, which creates an image on the fly and adds it to the end of the document:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 66px;
		text-align: left;
		overflow: auto">var img=document.createElement(&quot;img&quot;)
img.setAttribute('src', 'dd.gif')
document.body.appendChild(img)</pre>
</div>Ideally such an operation should be done after the document has loaded, though in most browsers, I noticed you can get away with it. In IE6 and IE7, however, things get a lot more unpredictable, and in the worst case scenario, disastrous. The exact curcumstances in which this can occur is described in the article &quot;<a href="http://support.microsoft.com/kb/927917/" target="_blank">Why do I receive an &quot;Operation aborted&quot; error message when I visit a Web page in Internet Explorer?</a>&quot;. I encountered this first hand while trying to debug <a href="http://dynamicdrive.com/dynamicindex1/dropmenuindex.htm" target="_blank">Anylink JS Menu</a>. This script dynamically adds a DIV to the page, with the operation run at the end of the document (instead of after it has fully loaded). I thought such timing would suffice in all the relevant browsers, and in my own testing, it does, including in IE6 and 7. Through bug reports posted on the forums, however, it became clear this wasn't always the case- depending on the page the script is added to, just calling the script- in turn trying to dynamically append an element to the document- at the bottom of the page isn't enough, and IE6/7 will fail, in a big way. Apparently when IE fails in inserting a new element to the document, it doesn't just spit out a JavaScript error, but it actually clears the entire page and shows a blank page with the error:<br />
<br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2" style="border:1px inset">
			
				&quot;<font color="Red">Internet Explorer cannot open the Internet site. Operation Aborted</font>&quot;.
			
		</td>
	</tr>
	</table>
</div>It's as if you've just visited a page that failed to load. This is a severe error, and one that an illegal JavaScript operation should never lead to. But then again, we are talking about IE.<br />
<br />
The fix is fairly simple- if you're attempting to dynamically create and insert new elements into the document, always do so either after the document has fully loaded, or its DOM has (<code style="background-color: #FFFFBB">DOMContentLoaded</code>). The later is more desirable since it's fired much sooner than the former, though implementing it across browsers is more tricky. There are numerous tutorials on the web explaining how to check for DOM readiness, such as <a href="http://www.javascriptkit.com/dhtmltutors/domready.shtml" target="_blank">this</a> and <a href="http://javascript.nwbox.com/IEContentLoaded/" target="_blank">this</a> tutorial.<br />
<br />
And yes, Anylink JS Menu has been fixed for the aforementioned bug. It now is initialized on DOM ready. Here's the relevant piece of code it relies on:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 498px;
		text-align: left;
		overflow: auto">domready:function(functionref){ //based on code from the jQuery library
	if (dd_domreadycheck){
		functionref()
		return
	}
	// Mozilla, Opera and webkit nightlies currently support this event
	if (document.addEventListener) {
		// Use the handy event callback
		document.addEventListener(&quot;DOMContentLoaded&quot;, function(){
			document.removeEventListener(&quot;DOMContentLoaded&quot;, arguments.callee, false )
			functionref();
			dd_domreadycheck=true
		}, false )
	}
	else if (document.attachEvent){
		// If IE and not an iframe
		// continually check to see if the document is ready
		if ( document.documentElement.doScroll &amp;&amp; window == window.top) (function(){
			if (dd_domreadycheck) return
			try{
				// If IE is used, use the trick by Diego Perini
				// http://javascript.nwbox.com/IEContentLoaded/
				document.documentElement.doScroll(&quot;left&quot;)
			}catch(error){
				setTimeout( arguments.callee, 0)
				return;
			}
			//and execute any waiting functions
			functionref();
			dd_domreadycheck=true
		})();
	}
	// A fallback to window.onload, that will always work
	anylinkmenu.addEvent([window], function(){if (!dd_domreadycheck){functionref(); dd_domreadycheck=true}}, &quot;load&quot;);
},</pre>
</div></div>

]]></content:encoded>
			<dc:creator>ddadmin</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=30</guid>
		</item>
		<item>
			<title>Document.write issues</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=29</link>
			<pubDate>Sat, 16 May 2009 23:48:44 GMT</pubDate>
			<description><![CDATA[The Ajax Includes Script given at http://www.dynamicdrive.com/dynamicindex17/ajaxincludes.htm uses document.write for including external content. Advantage: you don't have to explicitly bring the js belonging to the external file(s) to the main page. But beware the results in certain cases! In IE,...]]></description>
			<content:encoded><![CDATA[<div>The <i>Ajax Includes Script</i> given at <a href="http://www.dynamicdrive.com/dynamicindex17/ajaxincludes.htm" target="_blank">http://www.dynamicdrive.com/dynamici...axincludes.htm</a> uses <i>document.write</i> for including external content. Advantage: you don't have to explicitly bring the js belonging to the external file(s) to the main page. But beware the results in certain cases! In IE, (external) scripts added to the page using <i>document.write</i> are not run until after the <i>document.write</i> that adds them has finished. Non-IE browsers will run them straight away. So <div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 98px;
		text-align: left;
		overflow: auto">&lt;script type=&quot;text/javascript&quot;&gt;
document.write('dynamic.');
document.write('&lt;script src=&quot;bla.js&quot;&gt;&lt;\/script&gt;');
document.write('com.');
&lt;/script &gt;</pre>
</div>where <i>bla.js</i> contains <i>document.write('drive.')</i>, produces <i>dynamic.drive.com.</i> in non-IE, but <i>dynamic.com.drive.</i> in IE. So in IE, <i>document.write</i> may put external javascript at the wrong place. <br />
That is indeed what happens if we use the script given at <a href="http://www.dynamicdrive.com/dynamicindex17/ajaxincludes.htm" target="_blank">http://www.dynamicdrive.com/dynamici...axincludes.htm</a> to include the menu-files of <a href="http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/index.htm" target="_blank">http://www.dynamicdrive.com/dynamici...menu/index.htm</a>. Try for yourself. Things won't work in IE. (The only way to get out of this situation is to replace the external js belonging to the files_to_be_included with internal js). <br />
Of course, the cases mentioned here are only illustrations of a more general problem that we may encounter if we use <i>document.write</i> for including external content in an 'unwise' way.<br />
===<br />
Arie Molendijk.</div>

]]></content:encoded>
			<dc:creator>molendijk</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=29</guid>
		</item>
		<item>
			<title>Randomizing Fading Scroller</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=28</link>
			<pubDate>Mon, 11 May 2009 12:11:27 GMT</pubDate>
			<description><![CDATA[The script does not have a randomizing option on the scroller, and due to a recent thread I made. (http://www.dynamicdrive.com/forums/showpost.php?p=195970&postcount=2). 
 
Your new code should look like this: 
 
Code: 
--------- 
<script type="text/javascript"> 
...]]></description>
			<content:encoded><![CDATA[<div>The script does not have a randomizing option on the scroller, and due to a recent thread I made. (<a href="http://www.dynamicdrive.com/forums/showpost.php?p=195970&amp;postcount=2" target="_blank">http://www.dynamicdrive.com/forums/s...70&amp;postcount=2</a>).<br />
<br />
Your new code should look like this:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 498px;
		text-align: left;
		overflow: auto">&lt;script type=&quot;text/javascript&quot;&gt;

/***********************************************
* Fading Scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var delay = 2000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(255,255,255); // start color (red, green, blue)
var endcolor=new Array(0,0,0); // end color (red, green, blue)

var fcontent=new Array();
begintag='&lt;div style=&quot;font: normal 14px Arial; padding: 5px;&quot;&gt;'; //set opening tag, such as font declarations
fcontent[0]=&quot;&lt;b&gt;What\'s new?&lt;/b&gt;&lt;br&gt;New scripts added to the Scroller category!&lt;br&gt;&lt;br&gt;The MoreZone has been updated. &lt;a href='../morezone/index.htm'&gt;Click here to visit&lt;/a&gt;&quot;;
fcontent[1]=&quot;Dynamic Drive has been featured on Jars as a top 5% resource, and About.com as a recommended DHTML destination.&quot;;
fcontent[2]=&quot;Ok, enough with these pointless messages. You get the idea behind this script.&lt;/a&gt;&quot;;
closetag='&lt;/div&gt;';

var fwidth='150px'; //set scroller width
var fheight='150px'; //set scroller height

var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////


var ie4=document.all&amp;&amp;!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index = Math.floor(Math.random()*fcontent.length);


/*Rafael Raposo edited function*/
//function to change content
function changecontent(){
  if (index&gt;=fcontent.length)
    index=0
  if (DOM2){
    document.getElementById(&quot;fscroller&quot;).style.color=&quot;rgb(&quot;+startcolor[0]+&quot;, &quot;+startcolor[1]+&quot;, &quot;+startcolor[2]+&quot;)&quot;
    document.getElementById(&quot;fscroller&quot;).innerHTML=begintag+fcontent[index]+closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (ie4)
    document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
  index = Math.floor(Math.random()*fcontent.length);
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

function linkcolorchange(step){
  var obj=document.getElementById(&quot;fscroller&quot;).getElementsByTagName(&quot;A&quot;);
  if (obj.length&gt;0){
    for (i=0;i&lt;obj.length;i++)
      obj[i].style.color=getstepcolor(step);
  }
}

/*Rafael Raposo edited function*/
var fadecounter;
function colorfade(step) {
  if(step&lt;=maxsteps) {	
    document.getElementById(&quot;fscroller&quot;).style.color=getstepcolor(step);
    if (fadelinks)
      linkcolorchange(step);
    step++;
    fadecounter=setTimeout(&quot;colorfade(&quot;+step+&quot;)&quot;,stepdelay);
  }else{
    clearTimeout(fadecounter);
    document.getElementById(&quot;fscroller&quot;).style.color=&quot;rgb(&quot;+endcolor[0]+&quot;, &quot;+endcolor[1]+&quot;, &quot;+endcolor[2]+&quot;)&quot;;
    setTimeout(&quot;changecontent()&quot;, delay);
	
  }   
}

/*Rafael Raposo's new function*/
function getstepcolor(step) {
  var diff
  var newcolor=new Array(3);
  for(var i=0;i&lt;3;i++) {
    diff = (startcolor[i]-endcolor[i]);
    if(diff &gt; 0) {
      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
    } else {
      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
    }
  }
  return (&quot;rgb(&quot; + newcolor[0] + &quot;, &quot; + newcolor[1] + &quot;, &quot; + newcolor[2] + &quot;)&quot;);
}

if (ie4||DOM2)
  document.write('&lt;div id=&quot;fscroller&quot; style=&quot;border:1px solid black;width:'+fwidth+';height:'+fheight+'&quot;&gt;&lt;/div&gt;');

if (window.addEventListener)
window.addEventListener(&quot;load&quot;, changecontent, false)
else if (window.attachEvent)
window.attachEvent(&quot;onload&quot;, changecontent)
else if (document.getElementById)
window.onload=changecontent

&lt;/script&gt;</pre>
</div></div>

]]></content:encoded>
			<dc:creator>Nile</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=28</guid>
		</item>
		<item>
			<title>Tab Content script- Getting it to stop auto rotating after x cycles</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=27</link>
			<pubDate>Fri, 08 May 2009 00:57:09 GMT</pubDate>
			<description>*Original Script:* DD Drop Down Panel v1.01 (http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm) 
 
By default, when the script is set to auto cycle through the tabs, it does this indefinitely until the user clicks on one of the tabs. With the following modified version of the .js file, you...</description>
			<content:encoded><![CDATA[<div><b>Original Script:</b> <a href="http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm" target="_blank">DD Drop Down Panel v1.01</a><br />
<br />
By default, when the script is set to auto cycle through the tabs, it does this indefinitely until the user clicks on one of the tabs. With the following modified version of the .js file, you can have it automatically stop after x cycles, even if the user doesn't click on a tab during this time. Simply use the following modified .js file. If you wish to change the # of cycles from 2 to something else, change the part in red below inside it:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">if (this.elapsedcycles &gt;= this.hottabspositions.length*<font color="Red">2</font>)</pre>
</div></div>


<!-- attachments -->
	<div style="margin-top:10px">

		
		
		
		
			<fieldset class="fieldset">
				<legend>Attached Files</legend>
				<table cellpadding="0" cellspacing="3" border="0">
				<tr>
	<td><img class="inlineimg" src="http://www.dynamicdrive.com/forums/images/attach/js.gif" alt="File Type: js" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="http://www.dynamicdrive.com/forums/blog_attachment.php?attachmentid=6&amp;d=1241744213">tabcontent.js</a> (9.0 KB, 953 views)</td>
</tr>
				</table>
			</fieldset>
		

	</div>
<!-- / attachments -->
]]></content:encoded>
			<dc:creator>ddadmin</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=27</guid>
		</item>
		<item>
			<title>Extract external HTML via a hidden text/html-object</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=26</link>
			<pubDate>Tue, 05 May 2009 09:32:57 GMT</pubDate>
			<description><![CDATA[In the head: 
 
Code: 
--------- 
<!--[if IE]> 
<script type="text/javascript"> 
document.write('<object type="text/html" id="object_id" width="0" height="0" data="menu.html"><\/object>'); 
onload=function(){ 
document.getElementById('main_page_id').innerHTML =...]]></description>
			<content:encoded><![CDATA[<div>In the head:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 434px;
		text-align: left;
		overflow: auto">&lt;!--[if IE]&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
document.write('&lt;object type=&quot;text/html&quot; id=&quot;object_id&quot; width=&quot;0&quot; height=&quot;0&quot; data=&quot;menu.html&quot;&gt;&lt;\/object&gt;');
onload=function(){
document.getElementById('main_page_id').innerHTML = document.getElementById('object_id').object.documentElement.innerHTML;
}
&lt;/script&gt;
&lt;![endif]--&gt;
&lt;!--[if !IE]&gt;&lt;!--&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
/*We could do a document.write for the object, but we do it the dom-way */
var OBJ = document.createElement(&quot;object&quot;);
OBJ.setAttribute(&quot;type&quot;, &quot;text/html&quot;);
OBJ.setAttribute(&quot;data&quot;, &quot;menu.html&quot;);
OBJ.setAttribute(&quot;id&quot;, &quot;object_id&quot;);
OBJ.setAttribute(&quot;width&quot;, &quot;0px&quot;);
OBJ.setAttribute(&quot;height&quot;, &quot;0px&quot;);
document.documentElement.appendChild(OBJ);

onload=function(){
transfer = document.getElementById('main_page_id');
while(transfer.hasChildNodes())transfer.removeChild(transfer.firstChild);
transfer.appendChild(document.getElementById( 'object_id').contentDocument.documentElement.cloneNode(true));
}
&lt;/script&gt;&lt;!--&lt;![endif]--&gt;</pre>
</div>In the body:<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">&lt;div id=&quot;main_page_id&quot;&gt;&lt;/div&gt;</pre>
</div>See <a href="http://molendijk.110mb.com/include_menu12_with_object/ddlevels_page1.html" target="_blank">HERE</a> for demos and detailed explanations.<br />
===<br />
Arie Molendijk.</div>

]]></content:encoded>
			<dc:creator>molendijk</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=26</guid>
		</item>
		<item>
			<title>CSS Tidbit #1</title>
			<link>http://www.dynamicdrive.com/forums/blog.php?b=25</link>
			<pubDate>Tue, 28 Apr 2009 19:56:10 GMT</pubDate>
			<description><![CDATA[Have you ever noticed that ugly dotted border when you click a link? 
Here's how to make it go away and stay away. (Please don't laugh at the puny size of this tidbit.) 
Code: 
--------- 
a { outline: none; } 
---------]]></description>
			<content:encoded><![CDATA[<div>Have you ever noticed that ugly dotted border when you click a link?<br />
Here's how to make it go away and stay away. (Please don't laugh at the puny size of this tidbit.)<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 750px;
		height: 34px;
		text-align: left;
		overflow: auto">a { outline: none; }</pre>
</div></div>

]]></content:encoded>
			<dc:creator>techno_race</dc:creator>
			<guid isPermaLink="true">http://www.dynamicdrive.com/forums/blog.php?b=25</guid>
		</item>
	</channel>
</rss>
