Lets share love

How ? copy url of this blog and share in your social network :) simple

Lets share love

How ? copy url of this blog and share in your social network :) simple

Tuesday, April 29, 2014

How to reset select tag with jQuery

http://jsfiddle.net/TmJCE/10/


$('#name2').change(function(){
    $('#name').prop('selectedIndex',0);
});


$('#name').change(function(){
    $('#name2').prop('selectedIndex',0);
});
and html is ->
<select id="name" >
    <option value="">select all</option>
    <option value="1">Text 1</option>
    <option value="2">Text 2</option>
    <option value="3">Text 3</option>
</select>


<select id="name2" >
    <option value="">select all</option>
    <option value="1">Text 1</option>
    <option value="2">Text 2</option>
    <option value="3">Text 3</option>
</select>


the main code is 

$('#to').prop('selectedIndex',0);

where #to is id of my select tag . put it anywhere on an event listener

Sunday, April 27, 2014

retrieve hidden files using command

so your files are hidden by some viruses and want to see those file and your windows option to view file has is not working ...

here we have a solution

go to cmd and go to your drive

if your drive is D:

then in cmd window type ->  D:

then->>>>     attrib -h -s *.*
above command will show all file that have extension and wont do for folders. For folders

type ->>>>> attrib -h -s         ----and tab and select folder

Tuesday, April 22, 2014

how to undo mistakenly closed tab in browser

CTRL+SHIFT+T 

:) simple 

Friday, April 18, 2014

Example of Twitter Bootstrap 3 Accordion

for complete example here

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example of Twitter Bootstrap 3 Accordion</title>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css">
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<style type="text/css">
    .bs-example{
    margin: 20px;
    }
</style>
</head>
<body>
<div class="bs-example">
    <div class="panel-group" id="accordion">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">1. What is HTML?</a>
      </h4>
    </div>
    <div id="collapseOne" class="panel-collapse collapse in">
      <div class="panel-body">
        <p>HTML stands for HyperText Markup Language. HTML is the main markup language for describing the structure of Web pages. <a href="http://www.tutorialrepublic.com/html-tutorial/" target="_blank">Learn more.</a></p>
      </div>
    </div>
  </div>
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">2. What is Twitter Bootstrap?</a>
      </h4>
    </div>
    <div id="collapseTwo" class="panel-collapse collapse">
      <div class="panel-body">
        <p>Twitter Bootstrap is a powerful front-end framework for faster and easier web development. It is a collection of CSS and HTML conventions. <a href="http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/" target="_blank">Learn more.</a></p>
      </div>
    </div>
  </div>
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree">3. What is CSS?</a>
      </h4>
    </div>
    <div id="collapseThree" class="panel-collapse collapse">
      <div class="panel-body">
        <p>CSS stands for Cascading Style Sheet. CSS allows you to specify various style properties for a given HTML element such as colors, backgrounds, fonts etc. <a href="http://www.tutorialrepublic.com/css-tutorial/" target="_blank">Learn more.</a></p>
      </div>
    </div>
  </div>
</div>
</div>
</body>
</html>     

JS select tag

http://stackoverflow.com/questions/18016643/change-select-tag-value-using-javascript

in select tag if you need the first default as selected

<html>
<head>
<script language="javascript">

    function test()
    {   
        if (document.getElementById('txtTest').value=='')
        {
            document.getElementById("rdoSelect").selectedIndex = 0;
        }
        else
        {
            document.getElementById("rdoSelect").selectedIndex = 1;
        }
    }

</script>
</head>
<body>
<input type="text" id="txtTest" onchange="test();" />
<select name="rdoSelect" id="rdoSelect">
  <option value="option1">Option 1</option>
  <option value="option2">Option 2</option>
</select>
</body>
</html>

Wednesday, April 9, 2014

using Grails in Intellij

First you need to have JDK installed in your machine. Lets start from there.

Download JDK here  be careful to choose the system you are running is it 32 or 64 bit?

install it and then you need to give the enviromental varables.
-> go to my computer and in properties go to advanced setting and in advance tab you will find 'environmental variables'.

then a tab will open up and you need to set home for jdk and path there

FOR USER VARIABLES:
click on new option and  variable name: JAVA_HOME
variable value : the path that you have placed the jdk bin for me ::: C:\Program Files (x86)\Java\jdk1.7.0

now you have to set
FOR SYSTEM VARIABLES:
click on " path " and edit it place the path to the bin of jdk for me :::: C:\Program Files (x86)\Java\jdk1.7.0\bin

OKAY NOW YOUR java is installed.

now we have to install intellij and use grails library in it to develop grails application.
download grails from here and the put it somewhere.i put it at C:\grails\ then you have to set environmental variable similary as we did for java.

user variable : VARIABLE:==GRAILS_HOME
                      VALUE== C:\grails\bin (if you have put grails in C:\grails\ )
system variable: you have to set path similarly :C:\grails\bin(two paths should be seperated by a ';')

okay now you can use grails library in intellij.

thank you