General discussion

Locked

How to use hidden iframe

By tllcll ·
how to get the value selected by user (to be used in java - as a condition - for retrieving data from database) without submitting the form? I have many fields in that form and each each field required to check whether the data exist in the database and then retrieve other data fo be displayed in another field in the form.

can i use hidden iframe. if so, how to apply to the following codes

Pls help. TQ

Part of the code for ref - trans_main.jsp
--------------------------------------
<%@page import="java.util.List.*;"%>
<jsp:useBean id = "trx" class="trx.TransDetails" />
<%
String jCompany;
ArrayList listCompany = new ArrayList();
int sizeCompany=0;
%>

<html>
<head><title>JSP Page</title></head>
<title>Form</title>

<body>

<form name="transaction" method="post" >
<input type="hidden" name="hid_page" value="main"/>

<table>
<th width="9%"align="left">Company</th>
<td width="1%" align="center">:</td><td width="5%" >

<select name="co_no" id="co_no" >
<option value="select"></option>
<%
listCompany = trx.display_company();;
ListIterator iter = listCompany.listIterator();
while (iter.hasNext()) {
jCompany =(String)iter.next();
%>
<option value="<%=jCompany %>"><%=jCompany %></option>
<% } %>
</select>
</td>
</tr>

<tr>
<th width="9%"align="left">Project</th>
<td width="1%" align="center">:</td><td width="25%">
<select name="proj_cde" >
<option value="select"></option>
-----

</select>
</td>
</tr>
</table>
</form>
</body>
</html>

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Jaqui In reply to How to use hidden iframe

nope, the iframe would be a completely separate url, so checking the form data in a different part of the page wouldn't work.

and your form checker won't work for 50% of people, those that turn off java and javascript.

it is really bad practice to use clientside scripting.

Collapse -

by kungfu In reply to How to use hidden iframe

Have you looked into using AJAX. I have not used it yet but it may be what you are looking for. There are numerous articles if you Google AJAX.

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums