Posts

Showing posts from August, 2014

Genrate document through java cmd command.

javadoc *.class

java command-1

C:\Users\NAVJYOTI>echo %PATH% C:\Program Files\Java\jdk1.7.0_21\bin

Change iframe url through jquery.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("input[type='radio']").click(function(){  var r=$(this).val();  if(r==7)  {  $("#frame").attr('src', '7.html');  $("#frame").width(950);  $("#frame").height(1080);  return false;  }  else if(r==14)  {  $("#frame").attr('src', '14.html');  $("#frame").width(950);  $("#frame").height(2160);  }  else if(r==45)  {  $("#frame").attr('src', '7.html');  $("#frame").width(950);  $("#frame").height(1080); $("#frame1").attr('src', '1.html');  $("#frame1").width(950);  $("#frame1").height(200);  }  else if(r==90)  {  $("#frame").attr('src', '14.html');  

Jquery Accordion.

<html> <head>   <meta charset="utf-8" />   <title>Naveen</title>   <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />   <script src="http://code.jquery.com/jquery-1.9.1.js"></script>   <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>   <script>   $(document).ready(function() {     $( "#accordion" ).accordion({ active:true,          collapsible:true, }); $( "#accordion1" ).accordion({ active:true,          collapsible:true, }); $( "#accordion2" ).accordion(); $("#accordion2").accordion("destroy"); $("#accordion2").empty(); $( "#accordion" ).click(function(e) { });   });   </script> </head> <body> <div id="accordion">   <h3>First Section</h3>  

Insrt data through jquery.

package Connect; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; public class selling {     public int ID;     public String Bill_No;     public String Bill_Date;     public String Order_No;     public String Customer_Name;     public String Buyer_Tin;     public String Order_Date;     public String Product_Code;     public String Bill_Type;     public String Product_Name;     public double Sell_Price;     public int Sale_Quantity;     public double Total;     public double VAT;     public double SAT;     public double Round_Off;     public double Grand_Total;     public double SaleByAmount;     public double Margin;     public int getID() {         return ID;     }         public String getBill_No() {         return Bill_No;     }     public void setBill_No(String Bill_No) {         this.Bill_No = Bill_No;     }     public String getBill_Date() {         return Bill_Date

Click on Table set values on textbox.

  function showRow(row)             {             var x=row.cells;             document.getElementById("pc").value = x[0].innerHTML;             document.getElementById("pn").value = x[1].innerHTML;             document.getElementById("aq").value = x[2].innerHTML;             document.getElementById("mrp").value = x[3].innerHTML;             }  <div class="left">            <table id="invent">                 <th class="font">Product_code</th><th class="font">Product_Name</th><th class="font">Quantity</th><th class="font">M_R_P</th>                             <%             ArrayList list=i.list();             Iterator itr=list.iterator();             %>                             <%             int iii=0;             while(itr.hasNext())                 {             Inve

jquery ui datepicker example

<!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <%@ page  import="java.awt.*" %> <%@ page  import="java.io.*" %> <%@ page  import="org.jfree.chart.*" %> <%@ page  import="org.jfree.chart.entity.*" %> <%@ page  import ="org.jfree.data.general.*"%> <html>     <head>         <title>Web Expertese</title>         <meta charset="UTF-8">         <meta name="viewport" content="width=device-width">         <link href="newcss.css" rel="stylesheet" type="text/css"/>         <link href="jquery-ui.css" rel="stylesheet" type="text/css"/>         <script type="text/javascript" src="jquery-ui.js&

jquery jtable plugin example.

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"     pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title></title> <!-- Include one of jTable styles. --> <link href="css/metro/crimson/jtable.css" rel="stylesheet" type="text/css" /> <link href="css/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" /> <!-- Include jTable script file. --> <script src="js/jquery-1.8.2.js" type="text/javascript"></script> <script src="js/jquery-ui-1.10.3.custom.js" type="text/javascript"></script> <script src="js/jquery.jtable.js&

Datepicker through jquery.

 $(document).ready(function() {                             $( "#start" ).datepicker({ dateFormat: 'yy-mm-dd' });               $( "#end" ).datepicker({ dateFormat: 'yy-mm-dd' });               $("#chart").click(function(){                 $.ajax({                 type: "post",                 url: "buildreport1.jsp",                 data: {                     input: $('#start').val(),                     output: $('#end').val()                 },                 success: function(response){                     alert('hi');                 $('#output').html(response);                 }                   });               });             });

Update data in database through jquery.

<script> $(document).ready(function(){                 $("#add").click(function(){                     $.ajax({                        type: "post",                        url: "subquantity.jsp",                        data: {                             input: $('#pc').val(),                             output: $('#sq').val()                               },                        success: function(msg)                                 {                                                          }                     });                 });             });  </script> subquantity.jsp <%--     Document   : subquantity     Created on : Aug 6, 2014, 2:24:05 PM     Author     : NAVJYOTI --%> <%@page import="Connect.Invent"%> <%@page import="java.sql.Connection"%> <%@page import="Connect.databse"%> <%@page import="Connect.*"%> <jsp

set random number on textbox through java script.

function random()             {                 var generator = Math.floor(Math.random()*10000);                 var ss="BN"+"-"+generator;                 document.getElementById("bill").value=ss;                 var generator1 = Math.floor(Math.random()*10000);                 var ss1="ON"+"-"+generator1;                 document.getElementById("on").value=ss1;                 return false;             } <body class="aaa" onload="InitialLoad(); random();"> <tr>                             <td>Bill Number</td>                             <td><input type="text" name="bill" class="text4" id="bill"></td>                             <td>Bill Date</td>                             <td><input type="text" name="billdate" class="text4" id="billdate"><