• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

setting target on a href

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this is report_by_admin.jsp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<frameset rows="20%,80%" bgcolor="#FFCCFF">

<frame src="criteria.jsp">
<frame src="report.jsp" name="report1">
</frameset>



</HTML>

*******************************
this is criteria.jsp

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<script language="javascript">
function search_by_status()
{
document.form1.USER_ACTION.value="STATUS"
document.form1.action="report_status"

document.form1.submit()
}
</script>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY bgcolor="#FFCCFF">
<form name="form1" method="post" action="">
<%@ page language="Java"
import="java.util.*,
com.massif.iticket.dao.*,
com.massif.iticket.dto.*
"%>
<% statusDAO r2=new statusDAO();%>
<% List l2=r2.getallStatus();%>
<table bgcolor="#FFCCFF">
<tr>
<td>Report by Status</td>
</tr>
<tr>
<td>
<select name="statusSelect">
<% for(int i=0;i<l2.size();i++)
{
statusDTO rdto3=(statusDTO)l2.get(i);%>
<option value="<%=rdto3.getStatus_id()%>"><%=rdto3.getStatus_name()%></option>
<%}%>
</select>
</td>
<td>
<input type="hidden" name="USER_ACTION">
<A target="report1" style="cursor:hand" onclikc = "search_by_status()" >go</A>
</td>
</tr>

</table>
</form>
</BODY>
</HTML>
output is coming but it is on the criteria.jsp but i want it on report.jsp .on report1 frame.

please help me
thanks in advance..
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The target on the href has no effect when you are posting the form. You have the wrong target in your form.

Eric
 
Jyoti Jadhav
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
The target on the href has no effect when you are posting the form. You have the wrong target in your form.

Eric



what should i do if i want a output from servlet to some other frame(not on the frame on which request has generated)

thanks..
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Jyoti Jadhav
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:


thanks,
now its working..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic