File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes passing values to a pop up window (SOS) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "passing values to a pop up window (SOS)" Watch "passing values to a pop up window (SOS)" New topic

passing values to a pop up window (SOS)

amit malhotra
Ranch Hand

Joined: Aug 06, 2001
Posts: 30
hello friends,
here is a little problem that i have please see if you can fix it
<title>Project Life Cycle</title>
function buttonEvents(){

function buttonEvents1(){

function openWindow(){
open("path.jsp'","sayings","menubar=0,scrollbar=0, resizable=0, width=250,height=250,top=150, left=400")
<%@ 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">
<td width="100%" height="68">
<table border="0" width="100%" height="75" cellspacing="0" cellpadding="0">
<td width="100%" background="HEADER1.jpg" height="69"> </td>

<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>

<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>
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 ";
Connection conn=DriverManager.getConnection(protocol);
Statement stmt = conn.createStatement();
rs = stmt.executeQuery(sqlquery);

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

<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>
<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>

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
sanj singh
Ranch Hand

Joined: Jun 30, 2001
Posts: 129
Hi Amit
Try this"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.
amit malhotra
Ranch Hand

Joined: Aug 06, 2001
Posts: 30
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
I agree. Here's the link:
subject: passing values to a pop up window (SOS)
Similar Threads
How to validate that in each row how many checkboxes are checked
stylesheet effect are not showing in jsp page
calling the struts action on jquery button click
how to delete the rows which are checked
Error comes whilke compiling the jsp page