<?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>The Error Message &#187; Internet Explorer</title>
	<atom:link href="http://www.theerrormessage.com/category/internet-explorer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theerrormessage.com</link>
	<description>Fix your error</description>
	<lastBuildDate>Sun, 18 Jul 2010 03:21:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>base html tag does not apply correctly to all javascript and style files</title>
		<link>http://www.theerrormessage.com/2009/07/base-html-tag-does-not-apply-correctly-to-all-javascript-and-style-files/</link>
		<comments>http://www.theerrormessage.com/2009/07/base-html-tag-does-not-apply-correctly-to-all-javascript-and-style-files/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 15:21:40 +0000</pubDate>
		<dc:creator>gbl</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.theerrormessage.com/2009/07/03/base-html-tag-does-not-apply-correctly-to-all-javascript-and-style-files/</guid>
		<description><![CDATA[Problem: The &#60;base href="http://example.com/path/to/res/"&#62;  did not work at all on Internet Explorer &#8211; no javascript or style files were loaded and worked partially in Mozilla Firefox &#8211; a few javascript files were not pointing to the path that should be transformed by base href attribute. Example: Array( [0] =&#62; 1 ) &#60;!DOCTYPE html PUBLIC "-//W3C//DTD [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong>: The <code class="html">&lt;base href="http://example.com/path/to/res/"&gt;</code>  did not work at all on Internet Explorer &#8211; no javascript or style files were loaded and worked partially in Mozilla Firefox &#8211; a few javascript files were not pointing to the path that should be transformed by base href attribute.</p>
<p>Example:<br />
<code class="html"><br />
Array(<br />
[0] =&gt; 1<br />
)<br />
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;<br />
&lt;base href="http://example.com/path/to/res/"&gt;<br />
&lt;link rel="stylesheet" href="./css/styles.css" type="text/css" /&gt;<br />
&lt;scrupt src="./js/jquery.js" type="text/javascript"&gt;&lt;/script&gt;<br />
&lt;scrupt src="./js/j1.js" type="text/javascript"&gt;&lt;/script&gt;<br />
&lt;scrupt src="./js/j2.js" type="text/javascript"&gt;&lt;/script&gt;<br />
</code><br />
This code produced a page with no style files and  no javascript files included in Interenet Explorer 8 and a few javascript files (j1.js and j2.js) were not included in Firefox 3.5 because base tag was not applied. After several tests and all kind of different arrangements we discovered that the problem was the output before the page source the <code>Array ...</code> thing.</p>
<p><strong>Solution</strong>: no output before the page&#8217;s headers otherwise you can get all kind of strange results including a html base tag not working correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theerrormessage.com/2009/07/base-html-tag-does-not-apply-correctly-to-all-javascript-and-style-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Object doesn&#8217;t support property or method. Adding options in a &lt;select&gt; from a child window on Internet Explorer</title>
		<link>http://www.theerrormessage.com/2009/03/object-doesnt-support-property-or-method-adding-options-in-a-select-from-a-child-window-on-internet-explorer/</link>
		<comments>http://www.theerrormessage.com/2009/03/object-doesnt-support-property-or-method-adding-options-in-a-select-from-a-child-window-on-internet-explorer/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 01:55:36 +0000</pubDate>
		<dc:creator>gbl</dc:creator>
				<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.theerrormessage.com/2009/03/17/object-doesnt-support-property-or-method-adding-options-in-a-from-a-child-window-on-internet-explorer/</guid>
		<description><![CDATA[Full error message:  Object doesn&#8217;t support property or method. I got this error message in Internet Explorer 7 every time i tried to run code similar to the next snippet: window.opener.form.select[select.length]  = new Option(text, value); The problem is that on Internet Explorer due to some mysterious security restrictions you are not allowed to add new [...]]]></description>
			<content:encoded><![CDATA[<p>Full error message:  <em>Object doesn&#8217;t support property or method</em>. I got this error message in Internet Explorer 7 every time i tried to run code similar to the next snippet:</p>
<p><code class="javascript">window.opener.form.select[select.length]  = new Option(text, value);</code></p>
<p>The problem is that on Internet Explorer due to some mysterious security restrictions you are not allowed to add new options in a select element that resides in the parent (opener) window. In order to do this you need a workaround.</p>
<p>The easiest <strong>workaround</strong> is to <strong>write a function in the parent window that adds elements in the select element</strong>. The function should look something like this:</p>
<p><code class="javascript">function addOptionToSelect(formName, selectName, optionText, optionValue) {<br />
var elem = document.forms[formName].elements[selectName];<br />
elem.options[elem.length] = new Option(optionText, optionValue);<br />
}</code></p>
<p>This function has to be written in the parent window&#8217;s javascript and it will be accessed from child window with some code like this:</p>
<p><code class="javascript">window.opener.addOptionToSelect(formName, selectName, optionText, optioValue);</code></p>
<p><strong>Conclusion:</strong> Internet Explorer sucks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theerrormessage.com/2009/03/object-doesnt-support-property-or-method-adding-options-in-a-select-from-a-child-window-on-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
