Browser bookmark javascript bot

Nobody likes fill up the same form again and again. a few months back when my project manager introduced Project log, I used to fill up the same form daily with my name, email, offshore/onshore, developer/tester/designer, support/development. you know some data are constant, so I was finding some shortcut to do it. Then I found this tricks to fill constant data automatically.

Browser bookmark has a power to execute your custom javascript script.

Let me show an example. Click here to check the demo

browser-bookmark-javascript-bot

Suppose you have a form like this:

<form>
	<div class="form-group">
		<label for="email">Email address:</label>
		<input type="email" class="form-control" id="email">
	</div>
	<div class="form-group">
	  <label for="country">Select country:</label>
	  <select class="form-control" id="country">
		<option>Afganistan</option>
		<option>Bangladesh</option>
		<option>India</option>
		<option>Indonesia</option>
		<option>Thailand</option>
		<option>Usa</option>
	  </select>
	</div>
	<div class="form-group">
		<label for="comment">Comment:</label>
		<textarea class="form-control" rows="5" id="comment"></textarea>
	</div>
</form>

Now if you fill up this input fields with javascript your javascript is like:

document.getElementById('email').value="arka@coderexample.com";
document.getElementById('country').value="India";
document.getElementById('comment').value="lorem Ipsum sample text"; 

you can run this code from your bookmark address/location with a self-executed function like:

bookmark

javascript:function myRandomFunc(){ document.getElementById('email').value="arka@coderexample.com";document.getElementById('country').value="India";document.getElementById('comment').value="lorem Ipsum sample text";}myRandomFunc();    

I tried this tricks both in Firefox as well chrome, it works! I haven’t tried Internet explorer as I uninstalled it. As a developer, It saves lots of time of mine. you can also use this trick to any form like ticket booking or some time tracker.

Demo