<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>AJAX (Asynchronous JavaScripting and XML) Forum - Serverseitige Skriptsprachen</title>
		<link>http://www.ajax-community.de/</link>
		<description>AJAX Webprogrammierung mit PHP, Perl, Ruby, Python, etc.</description>
		<language>de</language>
		<lastBuildDate>Wed, 08 Sep 2010 14:04:46 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.ajax-community.de/images/misc/rss.png</url>
			<title>AJAX (Asynchronous JavaScripting and XML) Forum - Serverseitige Skriptsprachen</title>
			<link>http://www.ajax-community.de/</link>
		</image>
		<item>
			<title>Google Maps automatisch aktualisieren (nach Eingabe von einem Ort)</title>
			<link>http://www.ajax-community.de/serverseitige-skriptsprachen/8399-google-maps-automatisch-aktualisieren-eingabe-ort.html</link>
			<pubDate>Wed, 01 Sep 2010 19:41:43 GMT</pubDate>
			<description>Hi zusammen, ich bin neu hier und habe gleich mal eine Frage. Ich habe auf einer Seite (Mein das war Yelp.de) folgendes gefunden, was ich gerne für...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Hi zusammen, ich bin neu hier und habe gleich mal eine Frage. Ich habe auf einer Seite (Mein das war Yelp.de) folgendes gefunden, was ich gerne für mich umsetzen möchte.<br />
Hier hat man ein Orts und Postleitzahleingabefeld.<br />
Wenn man einen Ort z.H. Hamburg eingegeben hat, und eine zeitlang nichts weiter eingibt, wird eine Google Map automatisch (ohne Reload der kompletten Seite) neu geladen mit einem Kartenausschnitt von Hamburg.<br />
Ich möchte sowas gerne mit ASP.Net lösen. Könnt ihr mir da weiterhelfen?<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://www.ajax-community.de/serverseitige-skriptsprachen/">Serverseitige Skriptsprachen</category>
			<dc:creator>thomas_Klinger</dc:creator>
			<guid isPermaLink="true">http://www.ajax-community.de/serverseitige-skriptsprachen/8399-google-maps-automatisch-aktualisieren-eingabe-ort.html</guid>
		</item>
		<item>
			<title>Problem mit der verarbeitung mehrerer AJAX Requests</title>
			<link>http://www.ajax-community.de/serverseitige-skriptsprachen/8390-problem-verarbeitung-mehrerer-ajax-requests.html</link>
			<pubDate>Wed, 25 Aug 2010 16:54:35 GMT</pubDate>
			<description>Hallo liebe AJAX-Community, 
 
ich sitze nun leider schon seit zwei (oder vlt auch schon mehr) verzweifelten Tagen an folgendem Problem: 
Ich möchte...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Hallo liebe AJAX-Community,<br />
<br />
ich sitze nun leider schon seit zwei (oder vlt auch schon mehr) verzweifelten Tagen an folgendem Problem:<br />
Ich möchte meinen Kunden im Administrationsbereich seiner Webseite Listeneinträge editieren lassen können. Auf der Seite werden die Inhalte generell via eines XmlHttpRequests nachgeladen. Das heißt mit Klick auf z.B. &quot;Tätigkeitsfelder&quot; (in der Navigation) wird ein Request an eine php-datei geschickt welche via case switch eine andere php-datei (z.b. taetigkeit.php) zurückliefert. Diese Datei ersetzt unter Zuhilfenahme der Funktion innerHTML ein Div auf der Seite. Um die Tätigkeitsfelder editierbar zu machen wird eine Liste und gleich darunter ein Speichern-Button angezeigt. Die Listeneinträge werden via PHP (taetigkeit.php) aus einer MySQL DB abgefragt. Nun möchte ich die Listeneinträge mit druck auf den speichern button in die DB übertragen bzw. aktualisieren, was folgendermaßen passiert: Der Button ruft bei &quot;onClick&quot; die JS-Funktion update_Taetigkeit() auf. Diese soll - um ein mehrfaches überschreiben eines globalen xmlHttpObjekts zu verhindern - mehrere xmlHttpObjekte  erzeugen. Das geschieht zum Einen über einen Counter der die Listeneinträge mitzählt und zum Anderen über eine Funktion die ein Array der Größe des Counters erstellt. Dieses Array wird durchlaufen und jedes einzelne xmlHttpObjekt wird an eine &quot;update.php&quot; abgeschickt. Gleichzeitig übergebe ich das xmlHttpObjekt an eine handleRequestStateChange()-funktion, welche nach abgeschlossenem Request die Funktion handleServerResponse() aufrufen soll. <br />
So und hier ist nun der Haken:<br />
Die Daten werden erfolgreich via php-skript auf dem Server bzw. in der DB aktualisiert und gespeichert. Die Funktion handleServerResponse() wird allerdings nicht mehr ausgeführt. Seltsam ist, dass ich wenn ich einen alert() am Anfang der handleRequestStateChange()-Fkt. einfüge die handleServerResponse()-Fkt. schon ausgeführt wird, sonst nicht. Manch einer möge jetzt sagen:&quot;Was denn es funktioniert doch&quot;- ich möchte dem User aber natürlich mitteilen, dass er die Daten erfolgreich gespeichert hat.<br />
Noch eine kleine Anmerkung - ich bin eher neu in diesem Thema (AJAX), also bitte verzeiht diese in meinen Augen eher unellegante Lösung, für bessere Lösungen bin ich natürlich gerne offen!<br />
<b><br />
Hier ist der Code der angezeigten php-datei die bereits via eines xmlHttpRequests eingebunden wird:</b><br />
<div class="bbcode_container">
	<div class="bbcode_description">PHP-Code:</div>
	<hr /><code class="bbcode_code"><code><span style="color: #000000">
&lt;script&nbsp;language="javascript"&nbsp;type="text/javascript"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;count&nbsp;=&nbsp;0;<br />&lt;/script&gt;<br /><br />&lt;/head&gt;<br /><br />&lt;body&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;Tätigkeitsfelder&lt;/h1&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul&nbsp;id="mainLists"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--form&nbsp;id='editForm'&nbsp;action=''&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;fieldset--&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$res&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">'SELECT&nbsp;*&nbsp;FROM&nbsp;taetigkeitsfelder&nbsp;ORDER&nbsp;BY&nbsp;text'</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;(</span><span style="color: #0000BB">$row&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">$res</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'sub'</span><span style="color: #007700">&#93;&nbsp;==&nbsp;</span><span style="color: #0000BB">0&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;!isset(</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'isSubOf'</span><span style="color: #007700">&#93;))&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;li&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'text'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;type='text'&nbsp;name='text'&nbsp;/&gt;"</span><span style="color: #007700">;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;type='hidden'&nbsp;name='sub'&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'sub'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;type='hidden'&nbsp;name='isSubOf'&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'isSubOf'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;type='hidden'&nbsp;name='tFeldID'&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'tFeldID'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;/li&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;script&nbsp;language='javascript'&nbsp;type='text/javascript'&gt;count&nbsp;=&nbsp;count&nbsp;+&nbsp;1&lt;/script&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'sub'</span><span style="color: #007700">&#93;&nbsp;==&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;li&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'text'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;type='text'&nbsp;name='text'&nbsp;/&gt;"</span><span style="color: #007700">;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;type='hidden'&nbsp;name='sub'&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'sub'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;type='hidden'&nbsp;name='isSubOf'&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'isSubOf'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;type='hidden'&nbsp;name='tFeldID'&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'tFeldID'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;script&nbsp;language='javascript'&nbsp;type='text/javascript'&gt;count&nbsp;=&nbsp;count&nbsp;+&nbsp;1&lt;/script&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;ul&nbsp;id='mainListsSub'&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$resSub&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">'SELECT&nbsp;*&nbsp;FROM&nbsp;taetigkeitsfelder&nbsp;WHERE&nbsp;isSubOf&nbsp;='</span><span style="color: #007700">.</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'tFeldID'</span><span style="color: #007700">&#93;.</span><span style="color: #DD0000">'&nbsp;ORDER&nbsp;BY&nbsp;text'</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;(</span><span style="color: #0000BB">$rowSub&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">$resSub</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;li&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$rowSub</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'text'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;type='text'&nbsp;name='text'&nbsp;/&gt;"</span><span style="color: #007700">;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;type='hidden'&nbsp;name='sub'&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$rowSub</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'sub'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;type='hidden'&nbsp;name='isSubOf'&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$rowSub</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'isSubOf'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;input&nbsp;type='hidden'&nbsp;name='tFeldID'&nbsp;value='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$rowSub</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'tFeldID'</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;script&nbsp;language='javascript'&nbsp;type='text/javascript'&gt;count&nbsp;=&nbsp;count&nbsp;+&nbsp;1&lt;/script&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;/li&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;/ul&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;/li&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">?&gt;<br /></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input&nbsp;type='button'&nbsp;name='submit'&nbsp;onclick='update_Taetigkeit()'&nbsp;value='Speichern'&nbsp;/&gt;&lt;br&nbsp;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;<br />&lt;/body&gt;</span>
</code></code><hr />
</div> <b>Hier ist der Code der JS-Datei:</b><br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">/********* GLOBAL VARS ***********/<br />
var requestArray = new Array();<br />
var paramArray = new Array ();<br />
<br />
<br />
/********* FUNCTIONS ***********/<br />
<br />
function update_Taetigkeit () <br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; setParamArray();<br />
&nbsp; &nbsp; &nbsp; &nbsp; setRequestArray();<br />
&nbsp; &nbsp; &nbsp; &nbsp; for (var i=0; i &lt; count; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (requestArray[i])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params = paramArray.shift();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; requestArray[i].open(&quot;GET&quot;, &quot;update.php?&quot; + params,true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; requestArray[i].onreadystatechange = function () { handleRequestStateChange(requestArray[i]); };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; requestArray[i].send(null);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (e)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(&quot;Can't connect to server:\n&quot; + e.toString());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
<br />
function setParamArray()<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; for (var i=0; i&lt;count; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; paramArray[i] =&nbsp; &nbsp; &nbsp; &nbsp; &quot;tFeldID=&quot; + document.getElementsByName(&quot;tFeldID&quot;)[i].value <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + &quot;&amp;text=&quot; + document.getElementsByName(&quot;text&quot;)[i].value <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + &quot;&amp;sub=&quot; + document.getElementsByName(&quot;sub&quot;)[i].value <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + &quot;&amp;isSubOf=&quot; + document.getElementsByName(&quot;isSubOf&quot;)[i].value<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + &quot;&amp;tableID=taetigkeit&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
<br />
function setRequestArray() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; for (var i=0; i&lt;count; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; requestArray[i] = createMoreXmlHttpRequestObjects(i);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
<br />
function createMoreXmlHttpRequestObjects(k) <br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; requestArray[k];<br />
&nbsp; &nbsp; &nbsp; &nbsp; try <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; requestArray[k] = new XMLHttpRequest();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch (e) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var XmlHttpVersions = new Array (&quot;MSXML2.XMLHTTP.6.0&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;MSXML2.XMLHTTP.5.0&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;MSXML2.XMLHTTP.4.0&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;MSXML2.XMLHTTP.3.0&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;MSXML2.XMLHTTP&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;Microsoft.XMLHTTP&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (var i = 0; i&lt;XmlHttpVersions.length &amp;&amp; !requestArray[k]; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; requestArray[k] = new ActiveXObject (XmlHttpVersions[i]);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (e) {}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!requestArray[k])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert (&quot;Error creating the XMLHttpRequest object.&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; else <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return requestArray[k];<br />
}<br />
<br />
<br />
function handleRequestStateChange(xmlHttpObject) <br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (xmlHttpObject.readyState == 4)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (xmlHttpObject.status == 200)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handleServerResponse(xmlHttpObject);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (e)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(&quot;Eror reading the response: &quot; + e.toString());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(&quot;There was a problem retrieving the data:\n&quot; + xmlHttp.statusText);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
<br />
function handleServerResponse(xmlHttpObject) <br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; var content = xmlHttpObject.responseText;<br />
&nbsp; &nbsp; &nbsp; &nbsp; document.getElementById('mainContent').innerHTML = content;<br />
&nbsp; &nbsp; &nbsp; &nbsp; evalScript(content);<br />
}</code><hr />
</div> <br />
Wer mehr Code braucht oder andere Fragen hat, bitte bescheid sagen.<br />
Im Übrigen habe ich natürlich die Suchfunktion des Forums benützt und leider keine passende Lösung für meinen Fall gefunden (oder vielleicht auch nicht verstanden).<br />
Vielen Dank im Voraus!<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://www.ajax-community.de/serverseitige-skriptsprachen/">Serverseitige Skriptsprachen</category>
			<dc:creator>darizzle</dc:creator>
			<guid isPermaLink="true">http://www.ajax-community.de/serverseitige-skriptsprachen/8390-problem-verarbeitung-mehrerer-ajax-requests.html</guid>
		</item>
		<item>
			<title>Formularfeld, Grafik auswählen, Wert Modifizieren / zuweisen</title>
			<link>http://www.ajax-community.de/serverseitige-skriptsprachen/8386-formularfeld-grafik-auswaehlen-wert-modifizieren-zuweisen.html</link>
			<pubDate>Mon, 23 Aug 2010 19:40:40 GMT</pubDate>
			<description>Hallo, 
 
ich bin gerade dabei meine erste Seite mit CSS zu erstellen (bisher immer Tabellen) zudem Programmiere ich noch nicht lange und habe schon...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Hallo,<br />
<br />
ich bin gerade dabei meine erste Seite mit CSS zu erstellen (bisher immer Tabellen) zudem Programmiere ich noch nicht lange und habe schon so meine Probleme mit PHP, natürlich will man aber auch ein paar nette Sachen in der Seite haben also muss man sich zwangsläufig auch mit Javascript auseinander setzen ... Ok, schön der Kopf ist zwar schon am explodieren aber es langt natürlich noch nicht jetzt brauch ich auch noch unbedingt AJAX ... HILFE !<br />
<br />
Also konkret arbeite ich gerade an einer Seite zum Thema Abnehmen (<a href="http://www.123-Abnehmen.net" target="_blank">123 Abnehmen</a>) bzw. um genauer zu sein an meinem Admin. Ich habe dort die Möglichkeit eingebaut (bzw. werde noch einbauen) ein Vorschau-Bild hochzuladen möchte aber zusätzlich die Möglichkeit bieten eines aus dem vorhandenen Archiv zu wählen. Dafür habe ich eine Javascript-Slideshow für die Vorschaubilder benutzt. Das Problem ist jetzt wenn ich ein Bild auswählen würde müsste ich die Seite ja zwangsläufig neu Laden um diese ins Formular rein zu bekommen was auch bedeuten würde dass alle eingegebenen Daten verloren gehen (nicht schön). Daher suche ich eine Möglichkeit, ich glaube AJAX ist hier richtig, eine stelle, ohne die Seite neu laden zu müssen, zu aktualisieren.<br />
<br />
Konkret möchte ich den Code &quot;Bild XXX Wurde erfolgreich gew&amp;auml;hlt&quot; anzeigen wenn ein Gallerie-Bild gewählt wurde und zudem einen Namen oder eine Variable ins Hidden Feld rein bekommen (ohne die Seite neu zu laden). Ich würde mich echt freuen wenn jemand mir hier bei helfen könnte, ich bin mittlerweile echt mit dem ganzen PHP, CSS, JS ausgepowert und jetzt auch noch AJAX ...<br />
<br />
Ich habe den Code jetzt auf das nötigste abgekürzt, ich hoffe dass ich nicht irgendwas wichtiges vergessen habe.<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code"><br />
&lt;div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;label&gt;&lt;span class=&quot;line-heigh&quot;&gt;Beschreibung Bild:&lt;/span&gt;&lt;/label&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;file&quot; name=&quot;upload2&quot; id=&quot;upload2&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;label&gt;&lt;span class=&quot;line-heigh&quot;&gt;Oder ... Galerie:&lt;/span&gt;&lt;/label&gt; &lt;span class=&quot;line-heigh&quot;&gt;&lt;span class=&quot;green&quot;&gt;Bild XXX Wurde erfolgreich gew&amp;auml;hlt&lt;/span&gt;&lt;/span&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
<br />
&lt;input type=&quot;hidden&quot; name=&quot;xxx&quot; id=&quot;xxx&quot; /&gt;<br />
<br />
&lt;div id=&quot;container&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;gallery_container&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;thumb_container&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;thumbs&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DC080302018.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DC080302028.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DC080302030.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DC080302040.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DSC02825.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DSC02841.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DSC02865.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DSC02891.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DSC02916.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DSC02959.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;../_img/gallery/DSC03032.jpg&quot; width=&quot;84&quot; height=&quot;84&quot; /&gt;&lt;/a&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
&lt;/div&gt;</code><hr />
</div> <!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://www.ajax-community.de/serverseitige-skriptsprachen/">Serverseitige Skriptsprachen</category>
			<dc:creator>owi</dc:creator>
			<guid isPermaLink="true">http://www.ajax-community.de/serverseitige-skriptsprachen/8386-formularfeld-grafik-auswaehlen-wert-modifizieren-zuweisen.html</guid>
		</item>
		<item>
			<title>APC-Modul in PHP geht nicht (zur Messung des Upload-Fortschritts)</title>
			<link>http://www.ajax-community.de/serverseitige-skriptsprachen/8373-apc-modul-php-geht-messung-upload-fortschritts.html</link>
			<pubDate>Sat, 14 Aug 2010 13:09:18 GMT</pubDate>
			<description>Hallo Leute, 
 
ich schreibe grade ein Datei-Upload-Script mit PHP und möchte dem Benutzer den aktuellen Status des Uploads anzeigen. 
 
Dazu bedien...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Hallo Leute,<br />
<br />
ich schreibe grade ein Datei-Upload-Script mit PHP und möchte dem Benutzer den aktuellen Status des Uploads anzeigen.<br />
<br />
Dazu bedien ich mich dem <a href="http://www.php.net/manual/de/function.apc-fetch.php" target="_blank">APC-Modul</a> von PHP, das ich auf meinem Server installiert habe. Leider wird durchgehend &quot;false&quot; zurückgegeben von <div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">apc_fetch(&quot;upload_&quot;.$_GET['uid']);</code><hr />
</div> .<br />
<br />
Hier der gesamte Code:<br />
<br />
Die <b>status.php</b> wird per AJAX jede Sekunde aufgerufen und soll der Hauptdatei den aktuellen Stand des Uploads liefern:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&lt;?php<br />
header('Expires: Tue, 08 Oct 1991 00:00:00 GMT');<br />
header('Cache-Control: no-cache, must-revalidate');<br />
<br />
if(isset($_GET['uid'])){<br />
&nbsp;  $status = apc_fetch(&quot;upload_&quot;.$_GET['uid']);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp;  var_dump($status);<br />
}<br />
<br />
//echo round($status['current']/$status['total']*100);<br />
//Zur Berechnung des Status, habs aber erstmal als rausgemacht, da $status immer false ist.<br />
?&gt;</code><hr />
</div> Die $_GET['uid'] wird im Formular auf der Hauptseite wie folgt erzeugt:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&lt;input type=&quot;hidden&quot; name=&quot;APC_UPLOAD_PROGRESS&quot; value=&quot;&lt;?php echo uniqid();?&gt;&quot;/&gt;</code><hr />
</div> Folgendes kommt dann im Quelltext beim Client an:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&lt;input type=&quot;hidden&quot; name=&quot;APC_UPLOAD_PROGRESS&quot; value=&quot;4c668f8061c7b&quot;/&gt;</code><hr />
</div> Der Wert wird also auch korrekt erzeugt und ist in der status.php auch vorhanden (habs mit ner Ausgabe getestet).<br />
<br />
Daher kann meiner Meinung nach der Fehler nur in den Servereinstellungenn liegen. Diese sehen im APC-Modul wie folgt aus:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Directive&nbsp; &nbsp; &nbsp; &nbsp; Local Value&nbsp; &nbsp; &nbsp; &nbsp; Master Value<br />
apc.cache_by_default&nbsp; &nbsp; &nbsp; &nbsp; On&nbsp; &nbsp; &nbsp; &nbsp; On<br />
apc.coredump_unmap&nbsp; &nbsp; &nbsp; &nbsp; Off&nbsp; &nbsp; &nbsp; &nbsp; Off<br />
apc.enable_cli&nbsp; &nbsp; &nbsp; &nbsp; Off&nbsp; &nbsp; &nbsp; &nbsp; Off<br />
apc.enabled&nbsp; &nbsp; &nbsp; &nbsp; On&nbsp; &nbsp; &nbsp; &nbsp; On<br />
apc.file_update_protection&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; 2<br />
apc.filters&nbsp; &nbsp; &nbsp; &nbsp; no value&nbsp; &nbsp; &nbsp; &nbsp; no value<br />
apc.gc_ttl&nbsp; &nbsp; &nbsp; &nbsp; 3600&nbsp; &nbsp; &nbsp; &nbsp; 3600<br />
apc.include_once_override&nbsp; &nbsp; &nbsp; &nbsp; Off&nbsp; &nbsp; &nbsp; &nbsp; Off<br />
apc.max_file_size&nbsp; &nbsp; &nbsp; &nbsp; 120M&nbsp; &nbsp; &nbsp; &nbsp; 120M<br />
apc.mmap_file_mask&nbsp; &nbsp; &nbsp; &nbsp; no value&nbsp; &nbsp; &nbsp; &nbsp; no value<br />
apc.num_files_hint&nbsp; &nbsp; &nbsp; &nbsp; 1024&nbsp; &nbsp; &nbsp; &nbsp; 1024<br />
apc.report_autofilter&nbsp; &nbsp; &nbsp; &nbsp; Off&nbsp; &nbsp; &nbsp; &nbsp; Off<br />
apc.rfc1867&nbsp; &nbsp; &nbsp; &nbsp; On&nbsp; &nbsp; &nbsp; &nbsp; On<br />
apc.rfc1867_freq&nbsp; &nbsp; &nbsp; &nbsp; 50k&nbsp; &nbsp; &nbsp; &nbsp; 50k<br />
apc.rfc1867_name&nbsp; &nbsp; &nbsp; &nbsp; APC_UPLOAD_PROGRESS&nbsp; &nbsp; &nbsp; &nbsp; APC_UPLOAD_PROGRESS<br />
apc.rfc1867_prefix&nbsp; &nbsp; &nbsp; &nbsp; upload_&nbsp; &nbsp; &nbsp; &nbsp; upload_<br />
apc.shm_segments&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; 1<br />
apc.shm_size&nbsp; &nbsp; &nbsp; &nbsp; 64&nbsp; &nbsp; &nbsp; &nbsp; 64<br />
apc.slam_defense&nbsp; &nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0<br />
apc.stat&nbsp; &nbsp; &nbsp; &nbsp; On&nbsp; &nbsp; &nbsp; &nbsp; On<br />
apc.stat_ctime&nbsp; &nbsp; &nbsp; &nbsp; Off&nbsp; &nbsp; &nbsp; &nbsp; Off<br />
apc.ttl&nbsp; &nbsp; &nbsp; &nbsp; 7200&nbsp; &nbsp; &nbsp; &nbsp; 7200<br />
apc.user_entries_hint&nbsp; &nbsp; &nbsp; &nbsp; 4096&nbsp; &nbsp; &nbsp; &nbsp; 4096<br />
apc.user_ttl&nbsp; &nbsp; &nbsp; &nbsp; 7200&nbsp; &nbsp; &nbsp; &nbsp; 7200<br />
apc.write_lock&nbsp; &nbsp; &nbsp; &nbsp; On&nbsp; &nbsp; &nbsp; &nbsp; On</code><hr />
</div> Wo kann das Problem liegen, hat jemand eine Idee?<br />
<br />
Wär klasse wenn das jemand wüsste, bin total am verzweifeln...<br />
<br />
Danke!<br />
<br />
Mimi<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://www.ajax-community.de/serverseitige-skriptsprachen/">Serverseitige Skriptsprachen</category>
			<dc:creator>Mimi22</dc:creator>
			<guid isPermaLink="true">http://www.ajax-community.de/serverseitige-skriptsprachen/8373-apc-modul-php-geht-messung-upload-fortschritts.html</guid>
		</item>
		<item>
			<title>Ajax Datebankwert auslesen und in Echtzeit anzeigen</title>
			<link>http://www.ajax-community.de/serverseitige-skriptsprachen/8372-ajax-datebankwert-auslesen-echtzeit-anzeigen.html</link>
			<pubDate>Fri, 13 Aug 2010 17:57:08 GMT</pubDate>
			<description>Hallo zusammen, 
ich hänge schon seit langer Zeit daran und bekomme es absolut nicht hin. 
Es liegt wahrscheinlich zum Teil daran, dass ich zu wenige...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Hallo zusammen,<br />
ich hänge schon seit langer Zeit daran und bekomme es absolut nicht hin.<br />
Es liegt wahrscheinlich zum Teil daran, dass ich zu wenige Kenntnisse in JS und Ajax besitze.<br />
<br />
Also ich änder via PHP die Werte in einer SQL Datenbank.<br />
Jetzt will ich nur noch, dass diese Werte ausgelesen werden und in Echtzeit angezeigt werden. Also ohne kompletten Webseitenreload.<br />
<br />
Ich habe versucht die Werte über PHP auszulesen und dann an Ajax/JS weiterzuleiten, aber irgendwie ohne Erfolg. Könntet ihr mir bitte helfen? :|<br />
<br />
Ist es möglich, dass es nicht über einem Timer aktualisiert wird, sondern direkt wenn die Werte geändert werden?<br />
<br />
Gruß,<br />
Sascha<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://www.ajax-community.de/serverseitige-skriptsprachen/">Serverseitige Skriptsprachen</category>
			<dc:creator>xan589</dc:creator>
			<guid isPermaLink="true">http://www.ajax-community.de/serverseitige-skriptsprachen/8372-ajax-datebankwert-auslesen-echtzeit-anzeigen.html</guid>
		</item>
		<item>
			<title>Zeitproblem?</title>
			<link>http://www.ajax-community.de/serverseitige-skriptsprachen/8364-zeitproblem.html</link>
			<pubDate>Mon, 09 Aug 2010 14:27:53 GMT</pubDate>
			<description>Hallo! 
 
Ich habe ein recht merkwürdiges Problem mit Ajax: 
 
Aus Performancegründen wird ein Menü mit ca 7000 Datensätzen (ähnlich dem Windows...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Hallo!<br />
<br />
Ich habe ein recht merkwürdiges Problem mit Ajax:<br />
<br />
Aus Performancegründen wird ein Menü mit ca 7000 Datensätzen (ähnlich dem Windows Explorer aufgebaut) per Ajax aus einer Datenbank zusammengestellt. Dabei wird auf Klick immer nur die Ebene gelade, die gerade benötigt wird. Wenn die Ebene nicht mehr benötigt wird (zugeklappt) wird der Menüpunkt nicht gelöscht sondern nur versteckt, um mehrfaches Laden zu vermeiden.<br />
<br />
Das Grundproblem war dann, wenn man einen Menüpunkt angeklickt hat und damit die Seite neu geladen hat, ist die ganze Struktur wieder zusammengeklappt worden (Standardmäßig ist keine Subebene geöffnet). Die Verwendung von iframes oder AJAX für die restliche Seite ist nicht oder nur sehr schwer möglich, da ich ein vorgegebenes Framework verwenden muss und dies massive Eingriffe in den Kern und die Struktur des Frameworks nach sich ziehen würde.<br />
<br />
Deshalb wird, wenn eine Seite geladen wird, ein Script ausgeführt, das die einzelnen Menüpunkte bis zu diesem Unterpunkt lädt. (Code ist weiter unten, ich denke damit wird es verständlich)<br />
<br />
Der Code den ich habe funktioniert an sich, ABER:<br />
Es kommen immer wieder Fälle vor, in denen es nicht geht. Dies ist aber nicht abhängig von gewissen Menüpunkten sondern scheinbar rein &quot;zufällig&quot;, das heißt, mal klappt der Menüpunkt richtig auf und manchmal nicht. <br />
<br />
Gleich einmal vorweg: Meine Vermutung ist daher, das die zweite Funktion manchmal aufgerufen wird, bevor die erste fertig geladen wurde und daher den Fehler produziert. Eventuell benötigt man also einen Check, ob die Funktion in ihrer Auführung fertig ist? Aber dazu später mehr.<br />
<br />
Die Fehlermeldung die Firebug dabei ausgibt sieht ca folgendermaßen aus:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">GET http://tcweb/motdb/filebrowser.getdata.php?type=betriebe&amp;parentid=1<br />
200 OK&nbsp; &nbsp;  98ms&nbsp; &nbsp; &nbsp; index....id=1548 (Zeile 159)<br />
<br />
GET http://tcweb/motdb/filebrowser.getdata.php?type=kst&amp;parentid=18<br />
200 OK&nbsp; &nbsp;  118ms&nbsp; &nbsp;  index....id=1548 (Zeile 159)<br />
<br />
GET http://tcweb/motdb/filebrowser.getdata.php?type=objekte&amp;parentid=1800<br />
200 OK&nbsp; &nbsp;  160ms&nbsp; &nbsp;  index....id=1548 (Zeile 159)<br />
<br />
GET http://tcweb/motdb/filebrowser.getdata.php?type=aggregate&amp;parentid=316<br />
200 OK&nbsp; &nbsp;  129ms&nbsp; &nbsp;  index....id=1548 (Zeile 159)<br />
<br />
document.getElementById(type + parentid) is null<br />
[Break on this error] if(document.getElementById(type+parentid).innerHTML == &quot;&quot;) {<br />
index....id=1548 (Zeile 162)</code><hr />
</div> In diesem Fall sind die ersten 4 Ebenen richtig dargestellt worden und erst bei der letzen gab es einen Fehler. Ein erneuter Durchlauf in der selben Hierarchie Struktur bringt zum Beispiel einen Fehler an folgender Stelle:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&nbsp; &nbsp; &nbsp; &nbsp;  <br />
GET http://tcweb/motdb/filebrowser.getdata.php?type=betriebe&amp;parentid=1<br />
200 OK&nbsp; &nbsp; &nbsp; &nbsp; 83ms&nbsp; &nbsp; &nbsp; &nbsp; index....id=1800 (Zeile 159)<br />
<br />
GET http://tcweb/motdb/filebrowser.getdata.php?type=kst&amp;parentid=18<br />
200 OK&nbsp; &nbsp; &nbsp; &nbsp; 112ms&nbsp; &nbsp; &nbsp; &nbsp; index....id=1800 (Zeile 159)<br />
<br />
GET http://tcweb/motdb/filebrowser.getdata.php?type=objekte&amp;parentid=1800<br />
200 OK&nbsp; &nbsp; &nbsp; &nbsp; 102ms&nbsp; &nbsp; &nbsp; &nbsp; index....id=1800 (Zeile 159)<br />
<br />
document.getElementById(type + parentid) is null<br />
[Break on this error] if(document.getElementById(type+parentid).innerHTML == &quot;&quot;) {</code><hr />
</div> Der Fehler kann also an jeder Stelle auftreten und kommt immer zufällig. In ca. 50% der Fälle kommt es zu keinem Fehler (der Wert ist natürlich viel zu niedrig um den Fehler zu ignorieren)<br />
<br />
Der dazugehörige AJAX Code sieht wie folgt aus:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&lt;script&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; function getdata(type, parentid, xmlhttp) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (window.XMLHttpRequest) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlhttp = new XMLHttpRequest();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if (window.ActiveXObject) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlhttp = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } catch (e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlhttp = new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } catch (E) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlhttp = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (xmlhttp) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlhttp.open(&quot;GET&quot;, &quot;filebrowser.getdata.php?type=&quot;+type+&quot;&amp;parentid=&quot;+parentid, true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlhttp.overrideMimeType(&quot;text/xml; charset=ISO-8859-1&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlhttp.send(null);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlhttp.onreadystatechange = function() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(document.getElementById(type+parentid).innerHTML == &quot;&quot;) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(type+parentid).innerHTML=xmlhttp.responseText;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(type+parentid+&quot;_img&quot;).src=&quot;http://www.ajax-community.de/images/symbol/minus.gif&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(document.getElementById(type+parentid).style.display == &quot;none&quot;) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(type+parentid).style.display=&quot;block&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(type+parentid+&quot;_img&quot;).src=&quot;http://www.ajax-community.de/images/symbol/minus.gif&quot;;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(type+parentid).style.display=&quot;none&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(type+parentid+&quot;_img&quot;).src=&quot;http://www.ajax-community.de/images/symbol/plus.gif&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&lt;/script&gt;</code><hr />
</div> Der Script Code in den Dokumenten, der die Baumstruktur öffnet, sieht ungefähr so aus:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">PHP-Code:</div>
	<hr /><code class="bbcode_code"><code><span style="color: #000000">
<span style="color: #0000BB">$Script&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"&lt;script&gt;getdata('betriebe','1');&nbsp;getdata('kst','"</span><span style="color: #007700">.</span><span style="color: #0000BB">$obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">BID</span><span style="color: #007700">.</span><span style="color: #DD0000">"');&nbsp;getdata('objekte','"</span><span style="color: #007700">.</span><span style="color: #0000BB">$obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">KNR</span><span style="color: #007700">.</span><span style="color: #DD0000">"');&nbsp;getdata('aggregate','"</span><span style="color: #007700">.</span><span style="color: #0000BB">$obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">OBJID</span><span style="color: #007700">.</span><span style="color: #DD0000">"');&lt;/script&gt;"</span><span style="color: #007700">;&nbsp;<br /></span><span style="color: #0000BB"></span>
</span>
</code></code><hr />
</div> Ist das Dokument auf einer höheren Ebene, fallen die hinteren Funktionen dementsprechend weg.<br />
Die mit PHP generierten ID Werte habe ich bereits überprüft, auch bei Fehlerfällen werden sie richtig generiert, d.h. die Parameter für die JS Funktion sind ansich immer korrekt vorhanden.<br />
<br />
Hier vermute ich trotz allem den Fehler, da die Funktionen sequentiell hintereinander aufgerufen werden. Kann es eventuell sein, das die nächste getdata Funktion aufgerufen wird, bevor die vorhergehende abgeschlossen wurde? Eventuell wenn der AJAX Request zulange dauert?<br />
<br />
Bin wirklich am verzweifeln, da der Fehler wirklich zufällig ist und daher sehr schwer zu finden.<br />
<br />
Bin für jede Hilfe dankbar!<br />
<br />
so long<br />
Renegade<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://www.ajax-community.de/serverseitige-skriptsprachen/">Serverseitige Skriptsprachen</category>
			<dc:creator>-=Renegade=-</dc:creator>
			<guid isPermaLink="true">http://www.ajax-community.de/serverseitige-skriptsprachen/8364-zeitproblem.html</guid>
		</item>
	</channel>
</rss>
