jQuery – dynamically generated form submit is not working in IE10

I was trying to submit a dynamically generated form in IE10 by using the following code.

var $form = $("<form/>");
.append($("<input type="text" />").attr("name","var1").attr("value","SOME_DATA"))
.append($("<input type="text" />").attr("name","var2").attr("value","SOME_DATA"))
.append($("<input type="submit" value="submit" />"));

The code didn’t throw any errors but it didn’t submit the form either.

The solution:

The form needs to be added to the page before it can be submitted in IE10.

var $form = $("<form/>");
.append($("<input type="text" />").attr("name","var1").attr("value","SOME_DATA"))
.append($("<input type="text" />").attr("name","var2").attr("value","SOME_DATA"))
.append($("<input type="submit" value="submit" />"));
$form.hide(); // so the form won't actually show on the page

After adding the form to the page (See the code in bold), the form submits successfully.

In this article, I will show you how to setup ACL with Samba in Centos 6.

First you need to mount the filesystem with the acl option

To remount your current partition

# mount -o remount -o acl /dev/md0 /raid5

To mount on boot

# vi /etc/fstab

add acl option like this

/dev/md0 /raid5 ext3 acl 1 2

# groupadd samba_read
# setfacl -R -m g:samba_read:rx /raid5/server
# usermod -G samba_read andy

This creates a group “samba_read” which has read-only permission to the the directory /raid5/server. Then I add myself to the group.

# groupadd samba_write
# setfacl -R -m g:samba_write:rwx /raid5/server
# usermod -G samba_write andy

This creates a group “samba_write” which has read-write permission.


  • Samba supports ACL by default
  • you can also edit /etc/group to assign/delete the groups to/from users.
  • make sure you are not using force user = root on your shared directory. This will force everyone to have root access no matter what ACL permissions you have set.

Here are some tips and tricks for CentOS I have been using for a while . I am currently using CentOS 5.9. So I am not sure whether these will work on CentOS 6, but I don’t see why not.

1. make an alias for “vi” to use “vim”.

I think it’s much more useful to use vim because of the syntax highlighting and colors. It makes reading code and config files much easier and pleasing.

$ vi ~/.bashrc

add the following to the end.

alias vi=vim

log out and log in again.

(If this doesn’t work, do the same thing to ~/.bash_profile)

2. forward root’s emails to an external email

$ vi /etc/aliases

find this line

#root:   marc

uncomment it and change “marc” to your email address

then run this command to refresh the aliases.

$ newaliases

Another way to do it is that you can add your email address to ~/.forward

3. change the hostname

$ vi /etc/sysconfig/newwork

change HOSTNAME to the new host name


$ vi /etc/hosts

add the new host name to the line starting with

$ hostname newhost

4. Change ls directory color

$ cp /etc/DIR_COLORS ~/.dir_colors
$ vi .dir_colors

change DIR 01;34 (dark blue) to DIR 01:31 (red)

5. sendmail – configure the “From Address” as your domain name

$ vi /etc/mail/sendmail.mc

find these lines or add them if not exists

change EXPOSED_USER(`root')dnl to dnl EXPOSED_USER(`root')dnl
save the file. Then commit the change

$ m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Note: you might encounter this error when running the above command

$ /etc/mail/sendmail.mc:10: m4: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory

You need to install sendmail-cf

$ yum install sendmail-cf
$ service sendmail restart

Credits go to How to change vi color scheme in CentOS

I just did a minimal desktop install of CentOS 6 and did not like the default vi / vim color scheme.

Here is where the color schemes are located:


In the above example, vim72 is the version of vim, yours could be different.

First you have to copy /etc/vimrc to your home directory and rename to .vimrc

Now edit .vimrc that is in your home directory and add the following,

:color <yourcolorscheme>

So instead of <yourcolorscheme> you would put the color scheme you want from


It would have colors scheme files like this:

blue.vim, delek.vim, desert.vim, evening.vim etc.

When you add it to your .vimrc, you don’t need the .vim part. Just do:

:color desert

When using Apache with PHP 5.2 to set up php-fpm, PHP will be handled by FastCGI, which caused one major problem for me – anything under a subdirectory of “/var/www/html” (document root for Apache) gives the infamous error “Input file not specified”.

I have tried searching on the web and tried every single method/solution I could find, but nothing could fix it for me.

Then I decided to upgrade PHP from 5.2 to 5.3 (the latest version at the time of writing this post). PHP 5.3 has a different implementation on how php-fpm works. Surprisingly, without doing anything else, the error “Input file not specified” had disappeared and never came back again. When I do a phpinfo(), it shows that the “Server API” is “FPM/FastCGI”, and not “FastCGI/CGI” like before the upgrade.