Thursday, 9 October 2014

how to get the execution directory path in java


//how to get the execution directory path in java


package com.vipul.org;

public class GetRuningPath {

/**
* @param args
*/
public static void main(String[] args) {
String classpath = System.getProperty("user.dir");
System.out.println("" + classpath);
}

}

Sunday, 5 October 2014

radio button validation in jquery

<input class="attrInputs" type="radio" name="chest" value="A">
<input class="attrInputs" type="radio" name="chest" value="B">
<input class="attrInputs" type="radio" name="chest" value="C">
   
    radio button validation in jquery


==============================

if($('input[name=chest]:checked').length<=0)
{
 alert("No radio checked")
}

=======================================================
demo

black color code in css font

Black font color in csss

use



 color :#000000

Wednesday, 1 October 2014

jquery get value of input text field length

jquery get value of input text field length

Demo


jquery get value of input text field length

<input type="text" id="textbox"/>

<p>Error </p>
<button type="button" id="button">Click Me!</button>

============
$('#button').click(function() {
    var value = $('#textbox').val().length;
    
    if(value >=1)
    {
    alert(value);
         $("p").hide();
    }
    else{
    
        
    }
    
 
});
 



 

jquery show hide

jquery show hide

jquery show hide Demo

<input type="text" id="textbox"/>

<p>Error </p>
<button type="button" id="button">Click Me!</button>


$('#button').click(function() {
    var value = $('#textbox').val().length;
   
    if(value >=1)
    {
    alert(value);
         $("p").hide();
    }
    else{
    $("p").show();
       
    }
   

});








get input button value jquery

get input button value jquery

<input type="text" id="textbox"/>


<button type="button" id="button">Click Me!</button>


===============================================================
$('#button').click(function() {
   
    alert($('#textbox').val());
});

==============================================================
Please find Demo here

jquery call function on button click

jquery call function on button click

<button type="button" id="button">Click Me!</button>


$(function(){
    $('#button').click(function() {
        alert("Hello");
    });
});

Demo http://jsfiddle.net/vipulg/gm68jxas/2/