Pure PHP - JavaScript / Ajax
https://www.pure-php.de/taxonomy/term/2/0
enPHP Style Cookie and Get Parameters in JavaScript
https://www.pure-php.de/node/30
<p>For lazy phpers, with this function you can read cookies and get parameters in javascript in php style.<br />
(I use php tags to highlight the code)<br />
Example<br />
<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000CC"><?php<br />populateRequest</span><span style="color: #006600">();<br />if( </span><span style="color: #0000CC">$_COOKIE</span><span style="color: #006600">[</span><span style="color: #CC0000">'sid'</span><span style="color: #006600">] ) {<br /></span><span style="color: #FF9900">// do something<br /></span><span style="color: #006600">}<br />if( </span><span style="color: #0000CC">$_GET</span><span style="color: #006600">[</span><span style="color: #CC0000">'cmd'</span><span style="color: #006600">] == </span><span style="color: #CC0000">'login' </span><span style="color: #006600">) {<br /></span><span style="color: #FF9900">// do something<br /></span><span style="color: #006600">}<br /></span><span style="color: #0000CC">?></span>
</span>
</code></div></p>
<p><a href="https://www.pure-php.de/node/30">read more</a></p>https://www.pure-php.de/node/30#commentJavaScript / AjaxThu, 23 Feb 2006 09:56:08 +0100pure-php30 at https://www.pure-php.deThe easist way to avoid double clicks in submit buttons
https://www.pure-php.de/node/27
<p>Most of the sites have this problem, for example, when user want to create an account. The fill in the registration from, and submit the form. If the site is too slow at that moment. they would click again, and you have double entries.</p>
<p>With this JavaScript class, you deactivate this. Just put that and end of your site.<br />
<code><br />
function ClickObServer(){<br />
this.deactivateDoubleClicks = function() {<br />
this.checkClicks(document.getElementsByTagName("a"));<br />
this.checkClicks(document.getElementsByTagName("input"));<br />
}<br />
this.checkClicks = function ( el ){<br />
for (var i = 0; i < el.length; i++) {</p>
<p><a href="https://www.pure-php.de/node/27">read more</a></p>https://www.pure-php.de/node/27#commentJavaScript / AjaxFri, 25 Nov 2005 21:30:00 +0100pure-php27 at https://www.pure-php.de Datenschutz | Impressum