<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[devshare.de - erstes script geht nicht]]></title>
	<link rel="self" href="http://www.devshare.de/feed/atom/topic/41335/"/>
	<updated>2006-08-20T12:28:42Z</updated>
	<generator>PunBB</generator>
	<id>http://devshare.de/topic/41335/erstes-script-geht-nicht/</id>
		<entry>
			<title type="html"><![CDATA[Re: erstes script geht nicht]]></title>
			<link rel="alternate" href="http://devshare.de/post/46514/#p46514"/>
			<content type="html"><![CDATA[<p>Hi Superheld ;o)</p><p>Ich hab mal Dein Skript ausprobiert .. es funktioniert einwandfrei? Was klappt den bei Dir nicht, bzw. welchen Fehler bekommst Du?</p>]]></content>
			<author>
				<name><![CDATA[j|g]]></name>
				<uri>http://devshare.de/user/4/</uri>
			</author>
			<updated>2006-08-20T12:28:42Z</updated>
			<id>http://devshare.de/post/46514/#p46514</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[erstes script geht nicht]]></title>
			<link rel="alternate" href="http://devshare.de/post/46508/#p46508"/>
			<content type="html"><![CDATA[<p>hallo</p><p>um mal zu probieren, wie ajax so ist, habe ich mir vor kurzem von einer webseite ein script kopiert und getestet. allerdings geht es nicht. jetzt frage ich mich, was ich falsch mache. müssen einstellungen am server berücksichtigt werden? oder habe ich was anderes falsch gemacht? hier mal der code:</p><p>start:<br />&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;</p><p>function createRequestObject() {<br />&nbsp; &nbsp; var ro;<br />&nbsp; &nbsp; var browser = navigator.appName;<br />&nbsp; &nbsp; if(browser == &quot;Microsoft Internet Explorer&quot;){<br />&nbsp; &nbsp; &nbsp; &nbsp; ro = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br />&nbsp; &nbsp; }else{<br />&nbsp; &nbsp; &nbsp; &nbsp; ro = new XMLHttpRequest();<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; return ro;<br />}</p><p>var http = createRequestObject();</p><p>function sndReq(action) {<br />&nbsp; &nbsp; http.open(&#039;get&#039;, &#039;ajax_01_serverscript.php?action=&#039;+action);<br />&nbsp; &nbsp; http.onreadystatechange = handleResponse;<br />&nbsp; &nbsp; http.send(null);<br />}</p><p>function handleResponse() {<br />&nbsp; &nbsp; if(http.readyState == 4){<br />&nbsp; &nbsp; &nbsp; &nbsp; var response = http.responseText;<br />&nbsp; &nbsp; &nbsp; &nbsp; var update = new Array();</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if(response.indexOf(&#039;|&#039; != -1)) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; update = response.split(&#039;|&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(update[0]).innerHTML = update[1];<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }<br />}</p><br /><p>&lt;/script&gt;<br />&lt;a href=&quot;javascript:sndReq(&#039;foo&#039;)&quot;&gt;[foo]&lt;/a&gt;<br />&lt;div id=&quot;foo&quot;&gt;<br />&lt;/div&gt;</p><br /><br /><br /><br /><br /><br /><br /><p>server:<br />&lt;script&gt;</p><p>switch($_REQUEST[&#039;action&#039;]) {<br />&nbsp; &nbsp; case &#039;foo&#039;:<br />&nbsp; &nbsp; &nbsp; echo &quot;foo|foo done&quot;;<br />&nbsp; &nbsp; &nbsp; break;<br />}</p><p>&lt;/script&gt;</p><p>so schwer kann es ja nicht sein <img src="http://devshare.de/img/smilies/smile.png" width="15" height="15" alt="smile" /> was sagt ihr dazu. muss gehen oder geht nicht...?</p>]]></content>
			<author>
				<name><![CDATA[superheld]]></name>
				<uri>http://devshare.de/user/4704/</uri>
			</author>
			<updated>2006-08-18T15:09:58Z</updated>
			<id>http://devshare.de/post/46508/#p46508</id>
		</entry>
</feed>

