• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

passing values to a pop up window (SOS)

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends,
here is a little problem that i have please see if you can fix it
<html>
<head>
<title>Project Life Cycle</title>
<script>
function buttonEvents(){
document.forms[0].action="success.jsp";
document.forms[0].submit()
}

function buttonEvents1(){
document.forms[0].action="querycontent.jsp";
document.forms[0].submit()
}

function openWindow(){
open("path.jsp'","sayings","menubar=0,scrollbar=0, resizable=0, width=250,height=250,top=150, left=400")
}
</script>
</head>
<%@ page import="java.sql.*" %>

<body style="font-family: Verdana; font-size: 10pt; color: #000080" background="BACKGROUND1.jpg">
<table border="0" width="780" cellspacing="0" cellpadding="0" height="68">
<tr>
<td width="100%" height="68">
<table border="0" width="100%" height="75" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" background="HEADER1.jpg" height="69"> </td>
</tr>
</table>


<h3 align="center" >Project Life Cycle</h3>
<form name="feedbackform" method="post">
<div align="center">
<table border="1" width="650" style="font-family: Verdana; font-size: 10pt>


<tr>
<td align="center" ><b></b></td>
<td align="center" ><b>PID's</b></td>
<td align="center" nowrap><b>Equip List</td>
<td align="center" nowrap><b>Line List</td>
<td align="center" nowrap><b>Inst List</td>
</tr>
<%
String tableselected;
String driver="sun.jdbc.odbc.JdbcOdbcDriver";
String protocol="jdbc dbc:db2";
//Connection conn = null;
//Statement stmt = null;
ResultSet rs = null;
String sqlquery ="SELECT * FROM crude ";
Class.forName(driver);
Connection conn=DriverManager.getConnection(protocol);
Statement stmt = conn.createStatement();
rs = stmt.executeQuery(sqlquery);

while(rs.next()){
String PID_PATH = rs.getString(1);
String PID_311 = rs.getString(2);


%>
<tr>
<td align="center" width="50%">
<input type="submit" name="pid" value="<%= PID_311 %>" onClick="openWindow()"></td>
<td align="center"><input type="checkbox" name="amit" value="<%= PID_311 %>"></td>
<td align="center"><input type="checkbox" name="amit" value="<%= PID_311 %>"></td>
<td align="center"><input type="checkbox" name="amit" value="<%= PID_311 %>"></td>
</tr>
<%
}
%>
<tr>
<td> </td>
<td align="center"><input type="submit" value="Status" name="B1"onClick ="buttonEvents()">    <input type="submit" value="Doc" onClick ="buttonEvents1()"></td>
<td align="center"><input type="submit" value="Status" name="B2">    <input type="submit" value="Doc"></td>
<td align="center"><input type="submit" value="Status" name="B3">    <input type="submit" value="Doc"></td>
</tr>
</TABLE>

</div>
</form>
</body>
</html>
in the function openWindow() i am opening a pop up window called
path.jsp, i want to pass a parameter to it say PID_PATH
how do i do it ,please tell me as i have tried all the options
thanx
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amit
Try this
window.open("yourjsppage.jsp?param1=value1¶m2=value2.....");
I have done it the same way but I wasn't very successful if I tried passing other parameters like scrollbar etc.
regards
sanj
 
amit malhotra
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sanjay,
i will try out the same hope it works out, I was trying to pass the param in the same way but was unsuccessful, will rey out again
    Bookmark Topic Watch Topic
  • New Topic