Hello everybody,
As i get a value from javascript , i am in need of posting that to a jsp codes,
my code snippet is as............
her i need to pass the values as rs.filed(0) and (1)
any help will be appreciated highly,
with regards,
Creeds
As i get a value from javascript , i am in need of posting that to a jsp codes,
my code snippet is as............
Code:
<html>
<script type="text/javascript" src="gears_init.js"></script>
<script type="text/javascript">
var db = google.gears.factory.create('beta.database');
db.open('database-demo');
var rs = db.execute('select * from ntech');
while (rs.isValidRow()) {
alert(rs.field(0)+" "+rs.field(1));
var name=rs.field(0);
var address= rs.field(1);
alert(name);
alert(address);
<%
Connection conn = null;
ResultSet rs = null;
String result="";
PreparedStatement stmt = null;
try {
conn = Utilities.getDbConnection();
stmt = conn.prepareStatement("insert into test (name,address) values (rs.field(0),rs.field(1)) ");
her i need to pass the values as rs.filed(0) and (1)
any help will be appreciated highly,
with regards,
Creeds
Comment