write and earn money

Auto convert first character to uppercase in form using javascript

Posted by on Feb.17, 2013, under html, javascript, tricks No Comments

So you are looking to make first letter to uppercase. Here is my simple javascript code which does same for you. its for single name Like “Prashant” and for long name like “Prashant P Patil”

How its works?
Its works on keyevents where we are passing object of that form element and value from same element to the function.

Code:

<br /> <script type="text/javascript"> function update(d,g){ var s = ""; var i; var l = g.length; for(i=0;i<l;i++){ if(i==0 &#038;&#038; g[i] != " "){ s += g[i].toUpperCase(); } else if (g[i] != " "){ s += g[i]; } } d.value = s; } function update_long(d,g){ var s = ""; var i; var l = g.length; for(i=0;i<l;i++){ if(i==0 &#038;&#038; g[i] != " "){ s += g[i].toUpperCase(); } else if (g[i] != 0 &#038;&#038; g[i-1] == " "){ s += g[i].toUpperCase(); } else{ s += g[i]; } } d.value = s; } </script></p> <form name="frm"> Type short name : <input type="text" onkeyup="update(this,this.value)" name="nm" /><br /> Type full name : <input type="text" onkeyup="update_long(this,this.value)" name="nm" /></form> <p>

This is really helpful where u want user add proper names like starting with capital letter or full caps by using this script or editing this script.

feel free to link my site if you find my this small code snippet useful. I made for myself and sharing to entire world.

Have a great time guys and girls. :-)

share

Startup errors in Dreamweaver 8

Posted by on Jun.24, 2012, under windows 7 No Comments

Recently i faced startup error in Dreamweaver 8 which bugged me alot. Finally after googling i found solution for my Vista 7 as i unable to access “Application Data” folder because of some stupid windows security setting. Here are the step’s what i did!!

Step 1

Start up error caused due to some error in cache file. Delete FileCache.dat files from the Dreamweaver user configuration folder.
Delete the WinFileCache-7A9586CB.dat, MacFileCache-BFE7CE2E.dat, or FileCache.dat file from the Dreamweaver user configuration folder. It is recommended to delete the FileCache.dat file if you are experiencing a JavaScript error related to “dwscripts” or if you are receiving a “translators were not loaded” error message. The string of characters after “FileCache-” may differ on your machine. The location of the FileCache.dat file depends your operating system and your version of Dreamweaver. Note that on Windows, the Application Data and AppData folders are hidden by default, so verify that your Windows Explorer folder options are set to View Hidden Folders.

Dreamweaver CS3 on Windows Vista:
C:\Users\[username]\AppData\Roaming\Adobe\Dreamweaver 9\Configuration

Dreamweaver CS3 on Windows XP:
C:\Documents and Settings\[username]\Application Data\Adobe\Dreamweaver 9\Configuration

Dreamweaver 8 on Windows XP:
C:\Documents and Settings\[username]\Application Data\Macromedia\Dreamweaver 8\Configuration

Dreamweaver 8 on Windows Vista:
C:\Users\[username]\AppData\Roaming\Macromedia\Dreamweaver 8\Configuration

Dreamweaver CS3 on Macintosh:
Mac HD/Users/[user]/Library/Application Support/Adobe/Dreamweaver 9/

Dreamweaver 8 on Macintosh:
Mac HD/Users/[user]/Library/Application Support/Macromedia/Dreamweaver 8/

Step 2

To take ownership and open that folder i used following registry to get “Take Ownership” option.

1) Download the zip file below, and save it to your desktop.

Download

2. Open the downloaded zip file, extract (drag and drop) the .reg files to your desktop, then right click on the extracted .reg file you want to use and click on Merge.
NOTE: If you do not see a Merge option when you right click on the REG file, then you will need to check in Default Programs to set the reg file extension to have it’s Current Default program set as Registry Editor (C:\Windows\regedit.exe). Afterwards, try merging the REG file again.

3. Right click on whatever you want to own and and select take ownership, it works and I have used it heaps.

Now wait for some time and you will be able to open that folder. Now goto path mention in above step 1 and as per your version and delete cache .dat file.

You done it.

share