I am trying to solve how I can get input field and a button on the same line inside a table.
This is what I want to be inline:
<tr class="no-border">
<td colspan="2" class="hidden-xs"></td>
<td></td>
<td>
<form class="form-inline" action="add-to-cart/{{this._id}}" method="get">
<input type="text" name="numDays" id="numDays" class="numDays">
<button type="submit" name="button" class="btn btn-success">Click <i class="fa fa-angle-right"></i></button>
</form>
</td>
</tr>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<table class="table">
<thead class="thead-inverse">
<tr>
<th>what</th>
<th>huh</th>
<th>wait</th>
</tr>
</thead>
<tbody>
<tr class="no-border">
<td colspan="2" class="hidden-xs"></td>
<td></td>
<td>
<form class="form-inline" action="add-to-cart/{{this._id}}" method="get">
<div class="input-group">
<input type="text" name="numDays" id="numDays" class="numDays form-control">
<span class="input-group-btn">
<button type="submit" name="button" class="btn btn-success" id="bt">Click <i class="fa fa-angle-right"></i></button>
</span>
</div>
</form>
</td>
</tr>
</tbody>
</table>
<tr class="no-border">
<td colspan="2" class="hidden-xs"></td>
<td></td>
<td style="width:70%;">
<form class="form-inline" action="add-to-cart/{{this._id}}" method="get">
<input type="text" name="numDays" id="numDays" class="numDays">
<button type="submit" name="button" class="btn btn-success">Click <i class="fa fa-angle-right"></i></button>
</form>
</td>
</tr>
Related
How can I remove the space between two columns? I need the below-highlighted space to be removed.
I tried text-nowrap but didn't work as expected.
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0-2/css/all.min.css" rel="stylesheet">
<style>
.hiddenFramehideclass {
position: absolute;
top: -1px;
left: -1px;
width: 1px;
height: 1px;
}
</style>
<div class="container shadow p-3 sm-5 bg-white rounded">
<form method="post" class="needs-validation" action="" enctype="multipart/form-data" id="registerform" target="hiddenFrame">
<h2>Register</h2>
<hr />
<table class="table table-borderless text-nowrap">
<tbody>
<tr>
<td>
<label for="firstnameid">First Name: </label>
</td>
<td>
<input id="firstnameid" type="text" placeholder="First Name" class="form-control" name="txtfirstname" required />
</td>
</tr>
<tr>
<td>
<label for="lastnameid">Last Name: </label>
</td>
<td>
<input id="lastnameid" type="text" placeholder="Last Name" class="form-control" name="txtlastname" required />
</td>
</tr>
<tr>
<td>
<label for="emailid">Email: </label>
</td>
<td>
<input id="emailid" type="email" placeholder="Email" class="form-control" name="txtemail" required />
</td>
</tr>
<tr>
<td>
<label for="passwordid">Password: </label>
</td>
<td>
<input id="passwordid" type="password" placeholder="Password" class="form-control" name="txtupass" required />
</td>
</tr>
</tbody>
</table>
<hr />
<button type="submit" id="registersubmitbutton" class="btn btn-success" name="btn-register"><i class="fas fa-user-plus"></i> Register</button>
<br /><br /><br />
<span id="login_link"> Login Here </span>
<hr />
</form>
<iframe name="hiddenFrame" class="hiddenFramehideclass"></iframe>
</div>
As described in this answer, you can just define a small width like 1px for your first column, because table cells are expanded to the smallest size to fit its content, which will automatically remove this whitespace.
Here is your adjusted code example:
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0-2/css/all.min.css" rel="stylesheet">
<style>
.hiddenFramehideclass {
position: absolute;
top: -1px;
left: -1px;
width: 1px;
height: 1px;
}
table tr td:first-child {
width: 1px;
}
</style>
<div class="container shadow p-3 sm-5 bg-white rounded">
<form method="post" class="needs-validation" action="" enctype="multipart/form-data" id="registerform" target="hiddenFrame">
<h2>Register</h2>
<hr />
<table class="table table-borderless text-nowrap">
<tbody>
<tr>
<td>
<label for="firstnameid">First Name: </label>
</td>
<td>
<input id="firstnameid" type="text" placeholder="First Name" class="form-control" name="txtfirstname" required />
</td>
</tr>
<tr>
<td>
<label for="lastnameid">Last Name: </label>
</td>
<td>
<input id="lastnameid" type="text" placeholder="Last Name" class="form-control" name="txtlastname" required />
</td>
</tr>
<tr>
<td>
<label for="emailid">Email: </label>
</td>
<td>
<input id="emailid" type="email" placeholder="Email" class="form-control" name="txtemail" required />
</td>
</tr>
<tr>
<td>
<label for="passwordid">Password: </label>
</td>
<td>
<input id="passwordid" type="password" placeholder="Password" class="form-control" name="txtupass" required />
</td>
</tr>
</tbody>
</table>
<hr />
<button type="submit" id="registersubmitbutton" class="btn btn-success" name="btn-register"><i class="fas fa-user-plus"></i> Register</button>
<br /><br /><br />
<span id="login_link"> Login Here </span>
<hr />
</form>
<iframe name="hiddenFrame" class="hiddenFramehideclass"></iframe>
</div>
Good luck!
How to remove the line from the table rows? See below:
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<br /><br /><br />
<table class="table">
<tbody>
<tr style="text-align: center;">
<td>Quantity</td>
<td>Buy</td>
</tr>
<tr>
<td><input type="number" class="form-control" id="quantity" placeholder="Quantity" name="quantity"></td>
<td><input type="number" class="form-control" id="buy" placeholder="Buy Amount" name="buy"></td>
</tr>
</tbody>
</table>
</div>
How to remove the line from the table rows? See Above
Use table-borderless class to table tag. Reference here.
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<br /><br /><br />
<table class="table table-borderless">
<tbody>
<tr style="text-align: center;" class="">
<td>Quantity</td>
<td>Buy</td>
</tr>
<tr>
<td><input type="number" class="form-control" id="quantity" placeholder="Quantity" name="quantity"></td>
<td><input type="number" class="form-control" id="buy" placeholder="Buy Amount" name="buy"></td>
</tr>
</tbody>
</table>
</div>
I have three div one is main div, one div having two column table and another div has 5 column table. I have tried using bootstrap class "row" but I did not able to align them properly. How can I arrange this two div one beside another? Here below I have attached a picture. Can anyone please help me out for this problem.
here below is the code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>trial</title>
<!--Links for icons and images-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<!--css for paginated-->
<link rel="stylesheet" href="http://localhost/Performance/css/usermange.css">
<style>
#displayproject{
margin-top:100px;
position:fixed;
background-color:blue;
}
</style>
</head>
<body>
<div class="container">
<div id="displayproject">
<table class="table table-striped table-hover">
<thead>
<tr>
<th></th>
<th>Projects</th>
</tr>
</thead>
<tbody>
<?php
include_once "../Connection/dbconnect.php";
$fetch_projects = mysqli_query($GLOBALS['db'],"select project_id,project_name from project_table limit 10;");
while($row = mysqli_fetch_array($fetch_projects)){
echo '<tr>
<td>
<span class="custom-checkbox">
<input type="checkbox" name="options[]" value="hello">
<label></label>
</span>
</td>';
echo '<td>'.$row['project_name'].'</td></tr><tr></tr>';
}
?>
</tbody>
</table>
</div>
<div class="table-wrapper">
<div class="table-title">
<div class="row">
<div class="col-sm-6">
<h2>Manage <b>Employees</b></h2>
</div>
<div class="col-sm-6">
<i class="material-icons"></i> <span>Add New Employee</span>
<i class="material-icons"></i> <span>Delete</span>
</div>
</div>
</div>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>
<span class="custom-checkbox">
<input type="checkbox" id="selectAll">
<label for="selectAll"></label>
</span>
</th>
<th>Name</th>
<th>Email</th>
<th>Address</th>
<th>Phone</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="custom-checkbox">
<input type="checkbox" id="checkbox1" name="options[]" value="1">
<label for="checkbox1"></label>
</span>
</td>
<td>Thomas Hardy</td>
<td>thomashardy#mail.com</td>
<td>89 Chiaroscuro Rd, Portland, USA</td>
<td>(171) 555-2222</td>
<td>
<i class="material-icons" data-toggle="tooltip" title="Edit"></i>
<i class="material-icons" data-toggle="tooltip" title="Delete"></i>
</td>
</tr>
<tr>
<td>
<span class="custom-checkbox">
<input type="checkbox" id="checkbox3" name="options[]" value="1">
<label for="checkbox3"></label>
</span>
</td>
<td>Maria Anders</td>
<td>mariaanders#mail.com</td>
<td>25, rue Lauriston, Paris, France</td>
<td>(503) 555-9931</td>
<td>
<i class="material-icons" data-toggle="tooltip" title="Edit"></i>
<i class="material-icons" data-toggle="tooltip" title="Delete"></i>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
Output I am getting is
You can use bootstrap 3 , you can see the code here
https://codepen.io/shakercs/pen/MBgwQJ
<div class="container">
<div class="row">
<div class="col-md-12">
div is here
</div>
</div>
<div class="row">
<div class="col-md-3">
<table class="table table-bordered">
<thead>
<tr>
<th>checkbox</th>
<th>name</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" /></td>
<td>text</td>
</tr> <tr>
<td><input type="checkbox" /></td>
<td>text</td>
</tr> <tr>
<td><input type="checkbox" /></td>
<td>text</td>
</tr> <tr>
<td><input type="checkbox" /></td>
<td>text</td>
</tr> <tr>
<td><input type="checkbox" /></td>
<td>text</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-9">
<table class="table table-bordered">
<thead>
<tr>
<th>checkbox</th>
<th>name</th>
<th>title</th>
<th>title</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" /></td>
<td>text</td>
<td>text</td>
<td>text</td>
</tr> <tr>
<td><input type="checkbox" /></td>
<td>text</td>
<td>text</td>
<td>text</td>
</tr> <tr>
<td><input type="checkbox" /></td>
<td>text</td>
<td>text</td>
<td>text</td>
</tr> <tr>
<td><input type="checkbox" /></td>
<td>text</td>
<td>text</td>
<td>text</td>
</tr> <tr>
<td><input type="checkbox" /></td>
<td>text</td>
<td>text</td>
<td>text</td>
</tr> <tr>
<td><input type="checkbox" /></td>
<td>text</td>
<td>text</td>
<td>text</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
This should work for you -
<div class="container">
<div class="row">
<div class="col-md-12">
First div
</div>
</div>
<div class="row">
<div class="col-md-2 col-sm-2" style="border:1px solid">
<table class="table">
<tr>
<td>col</td>
<td>col</td>
</tr>
</table>
</div>
<div class="col-md-10 col-sm-12" style="border:1px solid">
<table class="table">
<tr>
<td>col</td>
<td>col</td>
<td>col</td>
<td>col</td>
<td>col</td>
</tr>
</table>
</div>
</div>
</div>
This is an example code. You can modify accordingly.
Fiddle
You need to use the float:value; property of css to achieve this.
value:left|right|clear
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>trial</title>
<!--Links for icons and images-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<!--css for paginated-->
<link rel="stylesheet" href="http://localhost/Performance/css/usermange.css">
<style>
#displayproject{
float:left;
margin-top:100px;
position:fixed;
background-color:blue;
}
</style>
</head>
<body>
<div class="container">
<div id="displayproject">
<table class="table table-striped table-hover">
<thead>
<tr>
<th></th>
<th>Projects</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="table-wrapper" style="float:right;">
<div class="table-title">
<div class="row">
<div class="col-sm-6">
<h2>Manage <b>Employees</b></h2>
</div>
<div class="col-sm-6">
<i class="material-icons"></i> <span>Add New Employee</span>
<i class="material-icons"></i> <span>Delete</span>
</div>
</div>
</div>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>
<span class="custom-checkbox">
<input type="checkbox" id="selectAll">
<label for="selectAll"></label>
</span>
</th>
<th>Name</th>
<th>Email</th>
<th>Address</th>
<th>Phone</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="custom-checkbox">
<input type="checkbox" id="checkbox1" name="options[]" value="1">
<label for="checkbox1"></label>
</span>
</td>
<td>Thomas Hardy</td>
<td>thomashardy#mail.com</td>
<td>89 Chiaroscuro Rd, Portland, USA</td>
<td>(171) 555-2222</td>
<td>
<i class="material-icons" data-toggle="tooltip" title="Edit"></i>
<i class="material-icons" data-toggle="tooltip" title="Delete"></i>
</td>
</tr>
<tr>
<td>
<span class="custom-checkbox">
<input type="checkbox" id="checkbox3" name="options[]" value="1">
<label for="checkbox3"></label>
</span>
</td>
<td>Maria Anders</td>
<td>mariaanders#mail.com</td>
<td>25, rue Lauriston, Paris, France</td>
<td>(503) 555-9931</td>
<td>
<i class="material-icons" data-toggle="tooltip" title="Edit"></i>
<i class="material-icons" data-toggle="tooltip" title="Delete"></i>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
I have followed the instructions given in the link
I had used jquery1.9.1.js and i had added the bootstrap-datepicker.js, datepicker.css to my page. when i click on the calender icon it was not responding, here is my code.
<%# page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<%# taglib uri="/tags/struts-html" prefix="html" %>
<%# taglib uri="/tags/struts-bean" prefix="bean" %>
<!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>Apply</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles/css/mystyle.css" type="text/css" />
<link rel="stylesheet" href="styles/css/bootstrap.min.css">
<link rel="stylesheet" href="styles/datapicker/css/datepicker.css" />
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12 col-xs-12 bg">
<table border="0">
<tr>
<td>Name</td><td colspan="5"><input type="text" value="<bean:write name="e" property="name" />" /></td>
</tr>
<br />
<tr>
<td>Leave type</td><td colspan="5"><select>
<option>---------select Leave type---------</option>
<option>Personal</option>
<option>Medical</option>
<option>Tour</option>
</select></td>
</tr>
<tr>
<td>Leave <br/> Balance</td><td colspan="5">
<bean:define id="bal" name="leave" property="balance" />
<html:text property="balance" value="<%=bal.toString() %>" />
</tr>
<tr>
<td>From</td><td colspan="2"><div class="form-group row">
<div class="col-xs-8">
<label class="control-label">My Label</label>
<div class="input-group date" data-datepicker="true" id="dp3" data-date="12-02-2012" data-date-format="mm-dd-yyyy">
<input class="form-control" type="text" value="12-02-2012">
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
</div>
</div>
</div>
</td>
<td colspan="3"><select>
<option>-------select---------</option>
<option>session1</option>
<option>session2</option>
</select>
</td>
</tr>
<tr>
<td>To</td><td colspan="2"><input type="text"></td>
<td colspan="2"><select>
<option>-------select---------</option>
<option>session1</option>
<option>session2</option>
</select>
</td>
<td>Holidays</td>
</tr>
<tr>
<td>Days</td><td colspan="5">0</td>
</tr>
<tr>
<td>Forward To/Approver</td><td colspan="5"><select>
<option>PLEASE SELECT-001</option>
<option>PLEASE SELECT-002</option>
<option>PLEASE SELECT-003</option>
<option>PLEASE SELECT-004</option>
</select>
</td>
</tr>
<tr>
<td>Reason</td><td colspan="5"> <textarea cols="50"></textarea></td>
</tr>
<tr>
<td>Contact Details</td><td colspan="5"> <textarea cols="50"></textarea></td>
</tr>
<tr>
<td><button class="btn btn-primary">cc</button></td><td colspan="4"> <textarea cols="50"></textarea></td><td><button class="btn btn-primary">clear</button></td>
</tr>
<tr>
<td colspan="6">(Separate multiple emails with commas)</td>
</tr>
<tr>
<td colspan="6">show all levels reviewer</td>
</tr>
<tr>
<td colspan="6"><button class="btn btn-primary">apply</button> <button class="btn btn-primary">cancel</button></td>
</tr>
</table>
</html:form>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="styles/datepicker/js/bootstrap-datepicker.js"></script>
<script src="styles/js/bootstrap.js"></script>
<script src="styles/js/jquery-1.9.1.js"></script>
<script src="styles/js/dropdown.js"></script>
</body>
</html>
Maybe it's better to place links in right order:
<script src="styles/js/jquery-1.9.1.js"></script>
<script src="styles/js/bootstrap.js"></script>
<script src="styles/datepicker/js/bootstrap-datepicker.js"></script>
<script src="styles/js/dropdown.js"></script>
I had some problem to load Class object with this code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Bidder Form</title>
<%String contextPath = request.getContextPath();%>
<link href="<%=contextPath%>/resources/css/home.css" rel="stylesheet" type="text/css" />
<link href="<%=contextPath%>/resources/css/theme_1.css" rel="stylesheet" type="text/css" />
<script src="<%=contextPath%>/resources/js/jQuery/jquery-1.4.3.min.js" type="text/javascript"></script>
<script src="<%=contextPath%>/resources/js/jQuery/jquery.validate.js"type="text/javascript"></script>
<script src="<%=contextPath%>/resources/js/form/deployJava.js" type="text/javascript"></script>
<script type="text/javascript">
var SignerAPI;
</script>
</head>
<jsp:useBean id="signerBean" class="com.cptu.egp.eps.web.utility.SignerAPI" />
<body>
<div id="appcon">
<applet codebase="" archive="Signer.jar" code="com.sanecode.SignerAPI.class" width="0" Height="0" ID="Signer" >
</applet>
<script type="text/javascript">
alert(deployJava);
alert('test 1');
deployJava.runApplet(
{
codebase:"",
archive:"Signer-1.0.0.jar",
code:"com.sanecode.SignerAPI.class",
width:"0",
Height:"0",
ID: "Signer",
classloader_cache: "false"
},
null,
"1.6"
);
alert('test 2');
alert(SignerAPI);
</script>
</div>
<div class="mainDiv">
<div class="dashboard_div">
<jsp:include page="../resources/common/AfterLoginTop.jsp"></jsp:include>
<div class="fixDiv">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td>
<div class="t_space">
<div class="pageHead_1">Bid Form</div>
<div> </div>
<table border="0" cellspacing="10" cellpadding="0" class="formStyle_1" width="100%">
<tr>
<td>
<table>
<tr>
<td valign="middle">Actual data : </td>
<td>
<textarea id="aData" cols="60" rows="10" class="formTxtBox_1"></textarea>
</td>
</tr>
<tr>
<td>Password : </td>
<td>
<input type="password" id="pwd1" name="pwd1" class="formTxtBox_1"/>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<label class="formBtn_1">
<input type="button" name="encrypt" id="encrypt" value="Encrypt">
</label>
</td>
</tr>
<script type="text/javascript">
$('#encrypt').click(function() {
alert('sanjay');
alert($('#aData').val());
alert(SignerAPI);
SignerAPI.setData($('#aData').val());
enc = SignerAPI.getSymEncrypt($('#pwd1').val());
$('#eData').val(enc);
//alert("done"+enc);
});
</script>
<tr></tr>
<tr>
<td valign="middle">Encrypted data : </td>
<td>
<textarea id="eData" cols="60" rows="10" class="formTxtBox_1"></textarea>
</td>
</tr>
<tr>
<td>Password : </td>
<td>
<input type="password" id="pwd2" name="pwd2" class="formTxtBox_1"/>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<label class="formBtn_1">
<input type="button" name="decrypt" id="decrypt" value="Decrypt"/>
</label>
</td>
</tr>
<tr></tr>
<SCRIPT type="text/javascript">
$('#decrypt').click(function() {
SignerAPI.setEncrypt($('#eData').val());
enc = SignerAPI.getSymDecrypt($('#pwd2').val());
$('#dData').val(enc);
});
</SCRIPT>
<tr>
<td valign="middle">Decrypted data : </td>
<td>
<textarea id="dData" cols="60" rows="10" class="formTxtBox_1"></textarea>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<jsp:include page="../resources/common/Bottom.jsp" ></jsp:include>
</div>
</div>
</head>
</html>
I tried out but I can't get object of "SignerAPI" , can anyone guide me?
add this somewhere:
$(function() {
SignerAPI = document.getElementById('Signer');
}
or change the ID of the applet from 'Signer' to 'SignerAPI'