<?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>mysrc.de &#187; Plugins</title>
	<atom:link href="http://www.mysrc.de/category/plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysrc.de</link>
	<description>- jQuery, Mootools u.a. JS-Frameworks</description>
	<lastBuildDate>Sun, 01 Aug 2010 02:49:35 +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>jQuery Form Plugin &#8211; Do some AJAX magic easily</title>
		<link>http://www.mysrc.de/jquery/jquery-form-plugin-do-some-ajax-magic-easily/</link>
		<comments>http://www.mysrc.de/jquery/jquery-form-plugin-do-some-ajax-magic-easily/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 15:33:54 +0000</pubDate>
		<dc:creator>Stefan Huissel</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Formulare]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://www.mysrc.de/?p=840</guid>
		<description><![CDATA[Neulich bin ich über ein Plugin gestoßen, dass Entwicklern auf einfachstem Wege die Möglichkeit bietet ihre Formulare AJAX gestützt umzusetzen. Mitentwickelt wurde es von John Resig, einem der Urväter von jQuery. Es überzeugt durch seine Funktionsvielfalt, sowie seine einfache Umsetzung. Es genügt ein Standard HTML Formular zu schreiben und danach das Plugin mit den gewünschten [...]]]></description>
			<content:encoded><![CDATA[<p>Neulich bin ich über ein Plugin gestoßen, dass Entwicklern auf einfachstem Wege die Möglichkeit bietet ihre<strong> Formulare AJAX gestützt</strong> umzusetzen. </p>
<p><a href="http://malsup.com/jquery/form/"><img src="http://www.mysrc.de/wp-content/uploads/2009/08/form_plugin1.jpg" alt="form_plugin" title="form_plugin" width="500" height="150" class="alignnone size-full wp-image-843" /></a></p>
<p>Mitentwickelt wurde es von <a href="http://ejohn.org/">John Resig</a>, einem der Urväter von jQuery.</p>
<p>Es überzeugt durch seine <strong>Funktionsvielfalt</strong>, sowie seine einfache Umsetzung. Es genügt ein Standard HTML Formular zu schreiben und danach das Plugin mit den gewünschten Optionen aufzurufen.<br />
Das könnte dann wie folgt aussehen:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p840code3'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p8403"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code" id="p840code3"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span> 
    <span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;path/to/jquery.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span> 
    <span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;path/to/form.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span> 
&nbsp;
    <span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> 
        $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
            <span style="color: #006600; font-style: italic;">// bind 'myForm' and provide a simple callback function </span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#myForm'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ajaxForm</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
                <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Formular wurde gesendet!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span> 
<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>form id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;myForm&quot;</span> action<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;comment.php&quot;</span> method<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;post&quot;</span><span style="color: #339933;">&gt;</span> 
    <span style="color: #000066;">Name</span><span style="color: #339933;">:</span> <span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;name&quot;</span> <span style="color: #339933;">/&gt;</span> 
    Kommentar<span style="color: #339933;">:</span> <span style="color: #339933;">&lt;</span>textarea <span style="color: #000066;">name</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;kommentar&quot;</span><span style="color: #339933;">&gt;&lt;/</span>textarea<span style="color: #339933;">&gt;</span> 
    <span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;submit&quot;</span> value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Abschicken&quot;</span> <span style="color: #339933;">/&gt;</span> 
<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Dieses Beispiel sendet die beiden Formularfelder Name und Kommentar <strong>als Ajax Request</strong> an das im form-tag angegebene Skript.<br />
Dies ist nur ein einfaches Beispiel. Weiterhin gibt es noch Methoden zur Formularberarbeitung wie <strong>reset, manueller submit, Erstellung eines querystring, etc.</strong></p>
<p>Das Plugin besitzt auch noch einige Optionen. Ein Auszug daraus:</p>
<ul>
<li>target</li>
<li>url</li>
<li>success</li>
<li>&#8230;</li>
</ul>
<p>Altgedienten Ajaxianer sollten diese Parameter bekannt sein. Benutzt werden sie dann so:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p840code4'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p8404"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code" id="p840code4"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Optionobjekt mit gesetzten Attributen</span>
<span style="color: #003366; font-weight: bold;">var</span> options <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> 
    target<span style="color: #339933;">:</span>     <span style="color: #3366CC;">'#divToUpdate'</span><span style="color: #339933;">,</span> 
    url<span style="color: #339933;">:</span>        <span style="color: #3366CC;">'comment.php'</span><span style="color: #339933;">,</span> 
    success<span style="color: #339933;">:</span>    <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
        <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Erfolgreich abgeschickt!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #009900;">&#125;</span> 
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #006600; font-style: italic;">// Options einfach der Mehthode ajaxForm als Parameter übergeben</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#myForm'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ajaxForm</span><span style="color: #009900;">&#40;</span>options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Einfacher lässt sich <strong>ein Ajaxformular</strong> kaum umsetzen. Also viel Spaß beim Testen. Zu finden ist das Ganze in englischer Doku und kleinen Beispielen bei <a href="http://malsup.com/jquery/form">Malsup</a>.</p>
<h3  class="related_post_title">Ähnliche Artikel</h3><ul class="related_post"><li>4. September 2009 -- <a href="http://www.mysrc.de/jquery/praxistip-output-element-des-jquery-validate-plugin-andern/" title="Praxistip: Output Element des jQuery Validate Plugin ändern">Praxistip: Output Element des jQuery Validate Plugin ändern</a></li><li>4. August 2009 -- <a href="http://www.mysrc.de/jquery/formularfelder-vorausfullen-und-leeren-mit-jquery-clearfield/" title="Formularfelder vorausfüllen und leeren mit jQuery Clearfield">Formularfelder vorausfüllen und leeren mit jQuery Clearfield</a></li><li>30. Juni 2009 -- <a href="http://www.mysrc.de/allgemein/jquery-mypass-password-hiding-iphone-style/" title="jQuery myPass &#8211; password hiding iPhone-Style">jQuery myPass &#8211; password hiding iPhone-Style</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mysrc.de/jquery/jquery-form-plugin-do-some-ajax-magic-easily/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery myPass &#8211; password hiding iPhone-Style</title>
		<link>http://www.mysrc.de/allgemein/jquery-mypass-password-hiding-iphone-style/</link>
		<comments>http://www.mysrc.de/allgemein/jquery-mypass-password-hiding-iphone-style/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 13:10:25 +0000</pubDate>
		<dc:creator>Oliver Storm</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Formulare]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.mysrc.de/?p=765</guid>
		<description><![CDATA[About Neulich abend saß ich auf dem Sofa und wollte mich über mein iPhone bei Facebook anmelden, bei der Eingabe meines Passwortes fiel mir wieder dieses kleine Detail auf, welches die Eingabe des Passwortes doch etwas angenehmer macht. Der ein oder andere iPhone-Besitzer weiß wovon ich rede. Davon das im Eingabefeld immer für kurze Zeit [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-727" title="nicePass - jQuery Plugin" src="http://www.mysrc.de/wp-content/uploads/2009/06/nicepass.jpg" alt="nicePass - jQuery Plugin" width="460" height="186" /></p>
<h3>About</h3>
<p>Neulich abend saß ich auf dem Sofa und wollte mich über mein iPhone bei <a title="Facebook - Oliver Storm" href="http://www.facebook.com/storm.oliver" target="_blank">Facebook</a> anmelden, bei der Eingabe meines Passwortes fiel mir wieder dieses kleine Detail auf, welches die Eingabe des Passwortes doch etwas angenehmer macht.</p>
<p>Der ein oder andere iPhone-Besitzer weiß wovon ich rede. Davon das im Eingabefeld immer für kurze Zeit der <strong>zuletzt eingegeben Buchstabe des Passworts</strong> zu sehen ist, was dem User doch mehr Sicherheit gibt das seine Eingabe korrekt war.</p>
<p>Ich dachte mir sowas könnte auch für <strong>normale Formulare</strong> ganz schön sein und deshalb haben wir  ein kleines <strong>jQuery-Plugin</strong> geschrieben welches dieses Verhalten imitiert.</p>
<h3>How to use</h3>
<p><strong>jQuery myPass</strong> nutzt die <a title="jQuery" href="http://jquery.com/" target="_blank">jQuery Javascript library</a>.</p>
<p>Ihr müsst nur die beiden Dateien in eueren Header einbinden.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p765code9'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p7659"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p765code9"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;_js/jquery.js&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;_js/jquery.myPass-1.0.js&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<h3>Options</h3>
<p>Um das Plugin zu aktivieren und einzustellen müsst Ihr nun nur noch folgendes in euren Header schreiben</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p765code10'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p76510"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p765code10"><pre class="javascript" style="font-family:monospace;">	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.myTextField'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">myPass</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
			charReplace <span style="color: #339933;">:</span> <span style="color: #3366CC;">'%u2665'</span><span style="color: #339933;">,</span>
			charDuration <span style="color: #339933;">:</span> <span style="color: #CC0000;">1000</span>
&nbsp;
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<ul>
<li><strong>charReplace:</strong> Hiermit könnt Ihr einstellen durch welches Zeichen die Buchstaben ersetzt werden sollen.Als default ist der Standard-Punkt eingestellt. Weitere Zeichen findet Ihr <a title="HTML Entity Browser Test Page" href="http://www.fileformat.info/format/w3c/entitytest.htm?sort=Unicode+Character" target="_blank">hier</a>.Nehmt einfach die letzten 4 Zahlen des Unicode und setzt %u davor. z.B. charReplace : &#8216;%u2665&#8242; um statt dem • ein ♥ zu verwenden.</li>
<li><strong>charDuration: </strong>Hiermit könnt Ihr einstellen wie lange das letzte Zeichen angezeigt werden soll.</li>
</ul>
<h3>HTML</h3>
<p>Im HTML-Teil eurer Seite legt Ihr nun einfach ein ganz normales Textfeld an, gebt diesem einen Namen und die Klasse welche Ihr oben eingetragen habt.</p>
<p>In diesem fall .myTextField.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p765code11'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p76511"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p765code11"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>form action<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;test.php&quot;</span> method<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;post&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>input <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;myTextField&quot;</span> <span style="color: #000066;">name</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;password&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>input <span style="color: #000066;">name</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Send&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;submit&quot;</span> value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;submit&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Nach dem senden des Formulars könnt Ihr eure Daten ganz einfach z.B. über PHP verarbeiten.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p765code12'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p76512"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p765code12"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Download &amp; Demo</h3>
<p><a title="myPass Plugin Demo" href="http://www.mysrc.de/plugins/myPass/demo/" target="_blank">Demonstration &#8211; Plugin in Action</a></p>
<p><a title="myPass Plugin - Download" href="http://www.mysrc.de/plugins/myPass/myPass.zip" target="_blank">Download &#8211; Alle Dateien zum Download</a></p>
<h3  class="related_post_title">Ähnliche Artikel</h3><ul class="related_post"><li>4. September 2009 -- <a href="http://www.mysrc.de/jquery/praxistip-output-element-des-jquery-validate-plugin-andern/" title="Praxistip: Output Element des jQuery Validate Plugin ändern">Praxistip: Output Element des jQuery Validate Plugin ändern</a></li><li>12. August 2009 -- <a href="http://www.mysrc.de/jquery/jquery-form-plugin-do-some-ajax-magic-easily/" title="jQuery Form Plugin &#8211; Do some AJAX magic easily">jQuery Form Plugin &#8211; Do some AJAX magic easily</a></li><li>4. August 2009 -- <a href="http://www.mysrc.de/jquery/formularfelder-vorausfullen-und-leeren-mit-jquery-clearfield/" title="Formularfelder vorausfüllen und leeren mit jQuery Clearfield">Formularfelder vorausfüllen und leeren mit jQuery Clearfield</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mysrc.de/allgemein/jquery-mypass-password-hiding-iphone-style/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
