Disable button onclick to prevent double submition

Today I had an simple task: to disable a button after a click to prevent double submitting the form data. I wanted to solve it as simple as possible. So here’s the final solution

<form method="POST" action="">
<input type="submit" value="Submit" name="submitBtn" onclick="this.disabled=true;this.form.submit();" >
</form>

It works like a charm – it disables the submit button and it submits the data.

NOTE
I have found a interesting bug in Chrome. My input button had its name set to “submit” (name=”submit”), but then chrome was reporting following error:

Uncaught TypeError: Property 'submit' of object #<HTMLFormElement> is not a function generate-form.php:onclick

The reason for the error when trying to call form.submit() is that your submit button is called “submit”. This means that the “submit” property of your Form object is now a reference to the submit button, overriding the “submit” method of the form’s prototype. Renaming the submit button allowed me to call the submit() method without that error, so I renamed it to “submitBtn”.

Tags: disable button onclick, onclick disable button, uncaught typeerror: property \submit\ of object #<htmlformelement> is not a function, javascript disable button onclick, submit button disable on click javascript, how to block link onclick, button onclick disable, disable double click button html, how to disable a button onclick in html, syncfusion button diable submit, button onclick prevent submit, onclick disabled, desactivate click buttom edit in xtragridcontrol, onclick desactivate button, onclick change the button text and disable, disable butto on click, javascirpt disable button onclick, imvxcommand disable on click, html disable clicks, disable click on a button, disable click on input button, do nit allow double click n abutton jquery, disable html button when clicked, how to disable button on click

How to backup data on second HDD using Google Drive

If you’re using Google Drive it’s default path is c:\User\USER_NAME\Google Drive\ but often my partition on c: is quite small since I only use it for operating system and I store all my data on other drives. So I’d like Google Drive to backup my data on other drive and still allow me to access it in my user’s folder. The idea is to create a symbolic link so that C:\User\USER_NAME\Google Drive\ links to e:\Backup in my case (or some other path in your case).

First close (quit) the Google Drive application.

1. Now you need to go and remove directory and all it’s files from C:\User\USER_NAME\Google Drive\ (or simply rename the folder or copy all files to your 2nd backup folder on other drive).

2. Than you need to run CMD as Administrator – see the picture below how:

Run CMD as Administrator

3. Then you need to make Smbolic link. But not a shortcut link than directory redirect link, entering mklink /D “c:\Users\USER_NAME\Google Drive” e:\Backup
If your backup path contains spaces put it in double quotes too like the fist path.
Making Symbolic link on Windows 7

Start the Google Drive and Snyc your data.

That’s it!

Tags: google drive flushed away english

How to change language in Google Drive application to English

Google Drive is great cloud service where you can store online or backup all your important files that you can later access wherever you are just by logging into your Gmail (Google) account and going to http://drive.google.com. You can drag and drop files to your browser while on that url or you can install their application that will sync a selected folder to the cloud. Problem is I can’t change the language on my Google Drive since there is nowhere to do so. I prefer that my Windows and all applications are in English. I have searched the Google Drive’s settings but seen nowhere to change settings but than I searched a bit more and I found rather simple solution.

Before you start you should close Google Drive.
Then you need to go to Control Panel -> System -> Advanced System Settings -> Advanced -> Environment Variables.
Then on user variables press New button for Variable name enter LANG and for value enter en_US.
Restart the Google Drive and it should work now in English.

Easy as a pie!

Here’s a screenshot of the windows that might help you find your way trough:
Google Drive language fix

Tags: change google drive language, change google drive to english, how to change google drive language, how to change language in google drive, change google drive language to english, how to change language on google drive, chANGE LANGUAGE GOOGLE DRIVE, google drive flushed away, google drive english, how to change google drive to english, wrong turn google drive, changer langue google drive, [0517/141305:ERROR:client_util cc(257)] Could not find exported function RelaunchChromeBrowserWithNewCommandLineIfNeeded, how do you change the language FOR GOOGLE ACCOUNT, change language in google drive, how to change google drive document that was sent in spanish, my google drive is in spanish, my google drive is in another language, how to change the language on google, when I click on google drive its in spanish, how to change my google drive to english, google drive change language, google drive arabic to english, where i can chnage the language in google drive, change language on google drive, change language google drive not logged in, change my google drive language, how do i change ggogle drive to show in english from chinese, google drive switch from spanish to english, google drive showing differnt languages, google drive is stuck on spanish language, change language settings google drive, google drive in polish, google drive goes to arabic to change to english, google drive flushed away enligsh