Skip to content
G31 Zone
  • About
  • Contact

jQuery Ajax – send all fields data by “POST”

Posted on: December 20, 2011 /
Categories: JQuery

jQuery Ajax – send all fields data by “POST” jQuery.ajax({ data: jQuery(‘#formId’).serialize(), // etc.. }

Lorem ipsum dolor sit amet

Posted on: December 16, 2011 /
Categories: Uncategorized

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vel enim erat, nec luctus mi. Integer id dolor a erat commodo imperdiet. Vivamus nec odio nibh, ut lobortis metus. Nunc rhoncus nunc augue. Suspendisse vitae justo nunc. Etiam tempor sagittis porta. Maecenas nec volutpat quam. Cras eget libero felis, ut fermentum odio. Quisque in tellus

Read More →

PHP – SOAP sample

Posted on: December 8, 2011 /
Categories: PHP

PHP simple SOAP sample SOAP server file (soapserver.php): <?php // Set a function in SOAP server file function hello($someone) { return “Hello ” . $someone . “!”; } // Create a new SOAP server $server = new SoapServer(null, array(‘uri’ => “urn://g31.local/ex/res”)); // Add function to SOAP server $server->addFunction(“hello”); // Handle SOAP server $server->handle(); ?> SOAP

Read More →

Redirect from www to non www using apache htaccess

Posted on: December 6, 2011 /
Categories: Apache

Redirect from www. to non www RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

XAMPP – Create subdomain (virtualhost)

Posted on: November 11, 2011 /
Categories: Apache

Edit Apache Config The file is located “c:xamppapacheconfextrahttpd-vhosts.conf”: Add this lines if not already exists: <VirtualHost 127.0.0.1:8080> DocumentRoot C:/xampp/htdocs/ ServerName localhost ServerAdmin admin@localhost </VirtualHost> Then add the following to have “c:xampphtdocssub.domain.com” point to http://sub.domain.com.localhost/: <VirtualHost subdomain.localhost> ServerName localhost ServerAdmin webmaster@localhost DocumentRoot /home/httpd/htdocs/subdomain/ ServerAlias subdomain.localhost </VirtualHost> Edit HOSTS File You can find your HOSTS file in

Read More →

Javascript print array elements and print object

Posted on: July 22, 2011 /
Categories: JavaScript

Print array elements with javascript: var output = ”; for(var i=0; i < arr.length; i++){ output += "arr[" + i + "] = " + arr[i] + ";"; } alert(output); Print object with javascript: var output = ''; for (property in object) { output += property + ': ' + object[property] +'; '; } alert(output);

Javascript – open a popup window using window.open

Posted on: July 21, 2011 /
Categories: JavaScript

The syntax of the window.open: open (URL, windowName[, windowFeatures]) example: window.open (“http://www.g31zone.com”,”G31zone”); window.open (“http://www.g31zone.com”, “G31zone”,”status=1,toolbar=1″); Parameters: status The status bar at the bottom of the window. toolbar The standard browser toolbar, with buttons such as Back and Forward. location The Location entry field where you enter the URL. menubar The menu bar of the window

Read More →

Verify if a checkbox is selected (checked) with jQuery

Posted on: July 15, 2011 /
Categories: JQuery

Verify if a checkbox is selected (checked) with jQuery <form name=”my_form_name” id=”my_check_box”> <input type=”checkbox” name=”my_check_box” id=”my_check_box”> </form> <script type=”text/javascript”> jQuery(document).ready(function() { jQuery(‘#my_check_box’).click(function () { if (jQuery(this).is(‘:checked’)) { alert(‘My checkbox is checked’); } } } </script>

jQuery – prevent form submitting

Posted on: July 15, 2011 /
Categories: JQuery

Method to prevent form submitting using jQuery: <form method=”post” name=”my_form_name” id=”my_form_id”> <input type=”submit” value=”Go”> </form> <script type=”text/javascript”> jQuery(‘#my_form_id’).submit(function() { alert(‘Prevent form submitting.’); return false; }); </script>

Javascript – limit the number of characters in a textarea

Posted on: June 24, 2011 /
Categories: JavaScript

Javascript – limit the number of characters in a textarea: <script language=”javascript” type=”text/javascript”> function limitText(fieldLimit, countLimit, limitNum) { if (fieldLimit.value.length > limitNum) { fieldLimit.value = fieldLimit.value.substring(0, limitNum); } else { countLimit.value = limitNum – fieldLimit.value.length; } } </script> <form name=”form_name”> <textarea name=”sometext” onKeyDown=”limitText(this.form.sometext,this.form.counter,100);” onKeyUp=”limitText(this.form.sometext,this.form.counter,100);”> </textarea><br /> (Maximum characters: 100)<br /> You have <input readonly type=”text”

Read More →

« 1 2 3 4 5 6 … 9 »

Categories

  • Apache
  • CentOS
  • Git
  • HTML
  • HTTP
  • JavaScript
  • JQuery
  • Linux
  • Magento
  • MySQL
  • PHP
  • Regular expression (Regex)
  • Smarty
  • Symfony 2 / Doctrine
  • Twig
  • Ubuntu
  • Uncategorized
  • Zend

Archives

  • June 2015
  • May 2015
  • March 2015
  • September 2014
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • January 2013
  • October 2012
  • August 2012
  • May 2012
  • April 2012
  • January 2012
  • December 2011
  • November 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010

Recent Posts

  • Connect to VPN from Linux
  • Enable slow query log on MySQL server
  • Doctrine Console Commands
  • Symfony2 Doctrine debug query
  • Mysqldump only tables with certain prefix

Tags

ajax all post data apache asynchronously bookmark categories images category category thumbnail create subdomain create virtualhost git git basics git force overwrite git pull htaccess html html codes HTTP status codes JavaScript javascript getcookie javascript get url javascript setcookie javascript strip tags javascript strip_tags jquery jquery.validator jquery ajax jquery bookmark jquery validator rule Lorem ipsum Magento mysql php preview button preview target blank print array products redirect www soap soap client soap sample soap server status codes zend framework 1 zend trace mysql errors

Copyright G31 Zone 2026 | Theme by Theme in Progress | Proudly powered by WordPress