<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://fbb.just4test.de/extern.php?action=feed&amp;tid=3269&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Informationen für CMS/made simple / [GELÖST] Formbuilder, Select und Javascript "onChange"]]></title>
		<link>http://www.cmsmadesimple.de/forum/viewtopic.php?id=3269</link>
		<description><![CDATA[Die aktuellsten Beiträge in [GELÖST] Formbuilder, Select und Javascript "onChange".]]></description>
		<lastBuildDate>Mon, 27 May 2013 08:25:39 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [GELÖST] Formbuilder, Select und Javascript "onChange"]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26410#p26410</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>Eigentlich schade, dass beim Formbuilder nicht die Werte aus dem Feld &quot;Übermittelter Wert&quot; übernommen werden</p></div></blockquote></div><p>Ist leider ein Fehler im FormBuilder.</p>]]></description>
			<author><![CDATA[dummy@example.com (NaN)]]></author>
			<pubDate>Mon, 27 May 2013 08:25:39 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26410#p26410</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] Formbuilder, Select und Javascript "onChange"]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26409#p26409</link>
			<description><![CDATA[<p>Gut zu wissen, dass das auch geht - sieht dann allerdings für den Nutzer nicht mehr so schön aus ...<br />Eigentlich schade, dass beim Formbuilder nicht die Werte aus dem Feld &quot;Übermittelter Wert&quot; übernommen werden - eigentlich lässt doch die Bezeichnung genau darauf schließen, oder?</p>]]></description>
			<author><![CDATA[dummy@example.com (jeff1980)]]></author>
			<pubDate>Mon, 27 May 2013 08:17:02 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26409#p26409</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] Formbuilder, Select und Javascript "onChange"]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26407#p26407</link>
			<description><![CDATA[<p>ich würde ja diese methode bevorzugen ;-)</p><div class="codebox"><pre><code>&lt;form&gt;
&lt;select name=&quot;Farbwaehler&quot; onChange=&quot;Bildladen(this.options[this.selectedIndex].text);&quot; size=&quot;1&quot;&gt;
 &lt;option value=&quot;1&quot;&gt;schmetterling&lt;/option&gt;
 &lt;option value=&quot;2&quot;&gt;blume&lt;/option&gt;
 &lt;option value=&quot;3&quot;&gt;geschenk&lt;/option&gt;
 &lt;option value=&quot;4&quot;&gt;gluehbluete&lt;/option&gt;
&lt;/select&gt;
&lt;/form&gt;
&lt;img id=&quot;mockup&quot; src=&quot;&quot; /&gt;

&lt;script&gt;
&lt;!--
function Bildladen(Bild)
{
	document.getElementById(&quot;mockup&quot;).src = &quot;mockup_&quot; + Bild + &quot;.png&quot;;
    return true;
}
//--&gt;
&lt;/script&gt;</code></pre></div><p>also Bildladen(this.options[this.selectedIndex].<span style="color: red">text</span>);</p>]]></description>
			<author><![CDATA[dummy@example.com (nicmare)]]></author>
			<pubDate>Sun, 26 May 2013 18:33:57 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26407#p26407</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] Formbuilder, Select und Javascript "onChange"]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26405#p26405</link>
			<description><![CDATA[<p>Ach, logisch - bei dem Bespiel von mir ja. Das war aber nur der Test-Code.<br />Die Bilder liegen natürlich im images-Ordner von CMSms und heißen auch nicht 1, 2 usw.:</p><div class="codebox"><pre><code>[== javascript ==]
&lt;script type=text/javascript&gt;
&lt;!--
function Bildladen(Bild)
{
	if (Bild==1) {
		Bild = &quot;uploads/images/mockup_schmetterling.png&quot;;
	} else if (Bild==2) {
		Bild = &quot;uploads/images/mockup_blume.png&quot;;
	} else if (Bild==3) {
		Bild = &quot;uploads/images/mockup_geschenk.png&quot;;
	} else if (Bild==4) {
		Bild = &quot;uploads/images/mockup_gluehbluete.png&quot;;
	}
	document.getElementById(&quot;mockup&quot;).src = Bild;
    return true;
}
//--&gt;
&lt;/script&gt;</code></pre></div><p>Das ist der Code, den ich nutze.<br />Aber trotzdem ein guter Hinweis mit dem &quot;+ &quot;.jpg&quot;&quot; - ich glaube, ich möchte mich mal mehr mit Javascript beschäftigen, damit ich nicht immer alles neu zusammen suchen muss ...</p>]]></description>
			<author><![CDATA[dummy@example.com (jeff1980)]]></author>
			<pubDate>Sun, 26 May 2013 10:39:48 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26405#p26405</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] Formbuilder, Select und Javascript "onChange"]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26404#p26404</link>
			<description><![CDATA[<div class="codebox"><pre><code>[== HTML ==]

&lt;form&gt;
&lt;select name=&quot;Farbwaehler&quot; onChange=&quot;Bildladen(this.options[this.selectedIndex].value);&quot; size=&quot;1&quot;&gt;
 &lt;option value=&quot;1&quot;&gt;Bild 1&lt;/option&gt;
 &lt;option value=&quot;2&quot;&gt;Bild 2&lt;/option&gt;
 &lt;option value=&quot;3&quot;&gt;Bild 3&lt;/option&gt;
 &lt;option value=&quot;4&quot;&gt;Bild 4&lt;/option&gt;
&lt;/select&gt;
&lt;/form&gt;
&lt;img id=&quot;mockup&quot; src=&quot;&quot; /&gt;

&lt;script&gt;
&lt;!--
function Bildladen(Bild)
{
	document.getElementById(&quot;mockup&quot;).src = Bild + &quot;.jpg&quot;;
    return true;
}
//--&gt;
&lt;/script&gt;</code></pre></div><p>hätte gereicht ;-)</p>]]></description>
			<author><![CDATA[dummy@example.com (nicmare)]]></author>
			<pubDate>Sun, 26 May 2013 08:42:55 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26404#p26404</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] Formbuilder, Select und Javascript "onChange"]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26403#p26403</link>
			<description><![CDATA[<p>So schwer ist Javascript ja gar nicht <img src="http://www.cmsmadesimple.de/forum/plugins/ezbbc/style/smilies/wink.png" alt="wink" /></p><p>Hab noch etwas recherchiert und dabei herausgekommen ist das hier:</p><div class="codebox"><pre class="vscroll"><code>[== HTML ==]

&lt;form&gt;
&lt;select name=&quot;Farbwaehler&quot; onChange=&quot;Bildladen(this.options[this.selectedIndex].value);&quot; size=&quot;1&quot;&gt;
 &lt;option value=&quot;1&quot;&gt;Bild 1&lt;/option&gt;
 &lt;option value=&quot;2&quot;&gt;Bild 2&lt;/option&gt;
 &lt;option value=&quot;3&quot;&gt;Bild 3&lt;/option&gt;
 &lt;option value=&quot;4&quot;&gt;Bild 4&lt;/option&gt;
&lt;/select&gt;
&lt;/form&gt;
&lt;img id=&quot;mockup&quot; src=&quot;&quot; /&gt;

&lt;script&gt;
&lt;!--
function Bildladen(Bild)
{
	if (Bild==1) {
		Bild = &quot;1.jpg&quot;;
	} else if (Bild==2) {
		Bild = &quot;2.jpg&quot;;
	} else if (Bild==3) {
		Bild = &quot;3.jpg&quot;;
	} else if (Bild==4) {
		Bild = &quot;4.jpg&quot;;
	}
	document.getElementById(&quot;mockup&quot;).src = Bild;
    return true;
}
//--&gt;
&lt;/script&gt;</code></pre></div><p>Das geht sicher noch einfacher/effektiver - aber egal, es macht, was es soll.</p>]]></description>
			<author><![CDATA[dummy@example.com (jeff1980)]]></author>
			<pubDate>Sun, 26 May 2013 08:27:36 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26403#p26403</guid>
		</item>
		<item>
			<title><![CDATA[[GELÖST] Formbuilder, Select und Javascript "onChange"]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26385#p26385</link>
			<description><![CDATA[<p>Hallo,</p><p>wieder einmal hänge ich - wahrscheinlich bei einer Kleinigkeit.<br />Mein Ziel:<br />In einem Formular (erstellt mit dem Formbuilder) möchte ich je nach ausgewähltem Wert in einem Ausklappmenü ein entsprechendes Bild darunter anzeigen lassen. Grundsätzlich habe ich es auch so weit, dass die &quot;src&quot; ausgetauscht wird. Allerdings nutzt der Formbuilder automatisch als Value 1, 2, 3 usw. und nicht das, was ich im jeweiligen Feld &quot;Übermittelter Wert&quot; eingegeben habe - und somit habe ich als &quot;src&quot; immer nur 1, 2 oder 3.</p><p>Das ist das Grundgerüst in HTML:</p><div class="codebox"><pre><code>[== HTML ==]
&lt;form&gt;
&lt;select name=&quot;Farbwaehler&quot; onChange=&quot;Bildladen(this.options[this.selectedIndex].value);&quot; size=&quot;1&quot;&gt;
 &lt;option value=&quot;1&quot;&gt;Bild 1&lt;/option&gt;
 &lt;option value=&quot;2&quot;&gt;Bild 2&lt;/option&gt;
 &lt;option value=&quot;3&quot;&gt;Bild 3&lt;/option&gt;
 &lt;option value=&quot;4&quot;&gt;Bild 4&lt;/option&gt;
&lt;/select&gt;
&lt;/form&gt;
&lt;img id=&quot;mockup&quot; src=&quot;&quot; /&gt;

&lt;script&gt;
&lt;!--
function Bildladen(Bild)
{
	document.getElementById(&quot;mockup&quot;).src = Bild;
    return true;
}
//--&gt;
&lt;/script&gt;</code></pre></div><p>Gibt es da jetzt eine Möglichkeit, im Javascript-Teil den einzelnen Values eine entsprechende URL zuzuordnen?</p><p>Ich habs schon mit &quot;var 1 = url_zum_bild.jpg&quot; versucht, wüsste aber nicht, wie ich das jetzt in die src kriege.<br />Ich hoffe, ihr verstehen, was ich meine ... ;-)</p>]]></description>
			<author><![CDATA[dummy@example.com (jeff1980)]]></author>
			<pubDate>Fri, 24 May 2013 18:53:13 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=26385#p26385</guid>
		</item>
	</channel>
</rss>
