Thursday, February 10, 2011

How to Submit a Form Using JavaScript

Generally, a form is submitted when the user presses a submit button. However, sometimes, you may need to submit the form programmatically using JavaScript.
JavaScript provides the form object that contains the submit() method. Use the ‘id’ of the form to get the form object.
For example, if the name of your form is ‘myform’, the JavaScript code for the submit call is:
document.forms["myform"].submit();

But, how to identify a form? Give an id attribute in the form tag
<form id='myform' action='formmail.pl'>
Here is the code to submit a form when a hyperlink is clicked:
<form name="myform" action="handle-data.php">
Search: <input type='text' name='query' />
<a href="javascript: submitform()">Searcha>
form>
<script type="text/javascript">
function submitform()
{
  document.myform.submit();
}
script>
if you want to want to study this in brief please follow the below link:
http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml


Monday, February 7, 2011

Friday, January 28, 2011

WordPress Template Tags Cheatsheet

WordPress Template Tags are used within the template files to dynamically display the content of your blog. They provide the tools you need to make specific requests to your database and return a set of results. Template Tags are on the greatest things about working with a platform such as WP, because they allow you to accomplish so much with little code.
Although there are tons of different tags used in the development and customization of WordPress themes, there are some that are extremely important and useful and you will see them in most themes.
Below I have provided you with a quick list of some of the key template tags to make your next Theme Development project a breeze.
follow the below link:
http://www.wpexplorer.com/wordpress-template-tags.html

Tuesday, January 18, 2011

Enable WordPress Permalink In Localhost Using XAMPP?

Do you want to change wordpress permalink in localhost using XAMPP but return page not found? So this is the right place for you to fix it and using permalink in localhost. As default, XAMPP was disabled rewrite module for .htaccess so it will ignore any rewrite module that needed to make permalink. To enable this module you just need easy one single step!
Here we go … By default, XAMPP will have folder installation in C:\xampp. Now open C:\xampp\apache\conf\httpd.conf using your favourite text editor (i prefer to Notepad++ since they very powerfull than original notepad) and find this code. If you using Notepad++ like me just press Ctrl+G and enter 118 to go to lines 118.
(#LoadModule rewrite_module modules/mod_rewrite.so)
Remove mark (#) from begining code. Now your code should be like this
(LoadModule rewrite_module modules/mod_rewrite.so)
Save file and close. Your permalink now is ready to use. Anyway to setting permalink in wordpress go to Dashboard > Settings > Permalinks. Usually i use only “/%postname%/” setting to more friendly in search engine. Of course it would be effective if you do this for online site.

THIS POST IS TAKEN FROM ( http://blog.smileylover.com/wordpress-permalink-in-localhost-xampp/)

See also the below links:-
http://www.lancelhoff.com/how-to-make-wordpress-permalinks-work-in-xampp/
http://www.techronnati.com/blog/wordpress-blog/wordpress-permalinks-work-localhost/

How to change the PHP version for subfolders or subdomains

  How to change the PHP version for subfolders or subdomains Setting a specific PHP version for a specific websites, subfolders or subdomain...