I am trying to create a "copy-paste javascript" (it will work when user paste this javascript on the url bar and press the return key) for http://www.vtunnel.com/. My script will automatically create a form to the current page and value of the "textbox" will automatically filled up with the current url, and submit the form. I am trying this JavaScript:
javascript:
_vtunnel_form=document.createElement('FORM');
_vtunnel_form.name='login';
_vtunnel_form.method='POST';
_vtunnel_form.action='http://www.vtunnel.com/index.php';
_vtunnel_h1=document.createElement('INPUT');
_vtunnel_h1.type='TEXT';
_vtunnel_h1.name='username';
_vtunnel_h1.value=encodeURIComponent(location.href);
_vtunnel_form.appendChild(_vtunnel_h1);
_vtunnel_h2=document.createElement('INPUT');
_vtunnel_h2.type='HIDDEN';
_vtunnel_h2.name='r4';
_vtunnel_h2.value=' checked';
_vtunnel_form.appendChild(_vtunnel_h2);
_vtunnel_h3=document.createElement('INPUT');
_vtunnel_h3.type='HIDDEN';
_vtunnel_h3.name='fa';
_vtunnel_form.appendChild(_vtunnel_h3);
_vtunnel_h4=document.createElement('INPUT');
_vtunnel_h4.type='HIDDEN';
_vtunnel_h4.name='if';
_vtunnel_h4.value=' checked';
_vtunnel_form.appendChild(_vtunnel_h4);
document.body.appendChild(_vtunnel_form);
_vtunnel_form.submit();
Computed code of the "Vtunnel" form is like below:
But it is not working properly. It is giving a 404 error. Why? Are there any solution?