<?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>Gargleblaster.org &#187; safari</title>
	<atom:link href="http://www.gargleblaster.org/tag/safari/feed" rel="self" type="application/rss+xml" />
	<link>http://www.gargleblaster.org</link>
	<description></description>
	<lastBuildDate>Wed, 16 Jun 2010 08:34:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Dashcode</title>
		<link>http://www.gargleblaster.org/2007/01/10/dashcode.html</link>
		<comments>http://www.gargleblaster.org/2007/01/10/dashcode.html#comments</comments>
		<pubDate>Wed, 10 Jan 2007 07:39:27 +0000</pubDate>
		<dc:creator>Merlijn</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[dashcode]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://www.gargleblaster.org/2007/01/10/dashcode.html</guid>
		<description><![CDATA[Apple released a public beta of Dashcode to ADC members (including the free accounts). I have to say I am deeply impressed. It has still some quirks, but it is stable and has stunning features. I started this week to play around with it and I can assure you it&#8217;s fun. Implementing a Scrollarea gave [...]]]></description>
			<content:encoded><![CDATA[<p>Apple released a public beta of Dashcode to ADC members (including the free accounts). I have to say I am deeply impressed.<br />
It has still some quirks, but it is stable and has stunning features.</p>
<p>I started this week to play around with it and I can assure you it&#8217;s fun.<br />
Implementing a Scrollarea gave some problems for me tho.<br />
(I admit, has a lot to do with my JS n00bness&#8230;but hey&#8230;)</p>
<p>If you you update the content of your scrollarea, don&#8217;t forget to refresh it&#8230;</p>
<p>example:</p>
<pre>if (logstatus == 0) {
		loginhoud = logcall.outputString;
		content.innerHTML = loginhoud;
		document.getElementById("scrollArea").object.refresh();
	}
	else {
		content.innerHTML = "Problem fetching server data...";
	}
</pre>
<p>I think this is missing in the documentation&#8230;(yup, reporting it to Apple as well).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gargleblaster.org/2007/01/10/dashcode.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AJAX with Safari</title>
		<link>http://www.gargleblaster.org/2006/12/15/ajax-with-safari.html</link>
		<comments>http://www.gargleblaster.org/2006/12/15/ajax-with-safari.html#comments</comments>
		<pubDate>Fri, 15 Dec 2006 11:03:47 +0000</pubDate>
		<dc:creator>Merlijn</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[XMLHttprequest]]></category>

		<guid isPermaLink="false">http://www.gargleblaster.org/?p=186</guid>
		<description><![CDATA[Mental note to myself: When making a POST request with XMLHttprequest and Safari(v2.0.4), always generate some content for the browser. If not, the status will always be undefined. example: if (!$mysqli->query($insert)) { trigger_error("error writing data: ".$insert); exit; } else { echo "0"; } This costed me some hours pulling my hair&#8230;. The following javascript works [...]]]></description>
			<content:encoded><![CDATA[<p>Mental note to myself:</p>
<p>When making a POST request with XMLHttprequest and Safari(v2.0.4), always generate some content for the browser. </p>
<p>If not, the status will always be <i>undefined</i>.<br />
example:</p>
<pre>if (!$mysqli->query($insert)) {
  trigger_error("error writing data: ".$insert);
  exit;
}
else {
  echo "0";
}
</pre>
<p>This costed me some hours pulling my hair&#8230;.<br />
The following javascript works like a charm when you return a &#8220;0&#8243; at the end of the php file called with POST. If you don&#8217;t return anything, Safari will decide that the HTTP headers are undefined and thus call the error handler.</p>
<pre>
KwAjax.ContentLoader.onReadyState=function(){
  var req=this.req;
  var ready=req.readyState;
  if (ready==KwAjax.READY_STATE_COMPLETE){
      var httpStatus=req.status;
      if (httpStatus == 200 || httpStatus == 0) {
        this.onload.call(this);
      }
      else {
        this.onerror.call(this);
      }
  }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.gargleblaster.org/2006/12/15/ajax-with-safari.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
