Manishhh Srivastva

Greenhorn
+ Follow
since Aug 12, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Manishhh Srivastva

below is my JSP.I am using ajax to post request.All javascript functions gets called on click.but
<script type="text/javascript">
alert('1111');
var pager = new Pager('results', 2);
pager.init();
pager.showPageNav('pager', 'pageNavPosition');
pager.showPage(1);
</script>
is not wriiten on click of any event.It never gets executes directly.even i dont get the alert...the same code if i keep as a functions and call it with onClick it gets called, but i cant use onClick..i want to load the stuff with JSP itself....It works well with normal JSP....Any ideas will be highly appreciated...I need to implement paging and its needed on JSP page....

Thnx in advance.



<%@ page import="java.util.List "%>
<%@ page import="com.fairpoint.omweb.web.form.CollocatedForm"%>
<%@ page import="com.fairpoint.omweb.persistence.CollocatedList"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-nested" prefix="nested"%>


<html:form styleId="collocatedForm" >
<% System.out.println("111111"); %>
<table>
<tr valign="top">
<td colspan="2"><logic:messagesPresent message="true">
<html:messages id="msg" message="true">
<font color="red"><b><bean:write name="msg" /></b></font>
<br />
</html:messages>
</logic:messagesPresent></td>
</tr>
<% System.out.println("222222222"); %>
<tr>
<td></td>
<td align="center"><b><font color="red">Collocated ACTLs</font></b></td>
<td></td>
</tr>
</table>
<hr width="100%" color="#99CCFF">
<% System.out.println("333333"); %>
<input type="hidden" name="indexCount" id="indexCount" value="0" />
<table id='addtab' border="1">
<tr bgcolor="#5CB3FF">
<!-- <td valign="top" align="left" width="5%"><input type="checkbox" name="checkboxValue" id="checkboxValue" onclick="selectAll();" /></td> -->
<td valign="top" align="left" width="5%">SELECT</td>
<td valign="top" align="left" width="10%"><b>CLLI CODE</b></td>
<td valign="top" align="left" width="10%"><b>CLLI TYPE</b></td>
<td valign="top" align="left" width="10%"><b>CLLI DECODE</b></td>
<td valign="top" align="left" width="10%"><b>ACNA</b></td>
<td valign="top" align="left" width="10%"><b>Last Modified UserName</b></td>
<td valign="top" align="left" width="15%"><b>Last Modified Date</b></td>

</tr>
<% System.out.println("444444"); %>
<bean:define id="collocationListSize" name="collocatedForm"
type="java.util.ArrayList" property="collocationList"></bean:define>
<% System.out.println("Size is:::" +collocationListSize.size());
int colSize = collocationListSize.size();
System.out.println("Size is:::" +colSize); %>
<input type="hidden" name="colSizeId" id="colSizeId" value="<%= colSize%>" />
<% System.out.println("usocListUtilList test : " + collocationListSize.getClass()); %>
<% CollocatedForm form = (CollocatedForm)request.getAttribute("collocatedForm");
System.out.println("1111122222");
List list = form.getCollocationList();
System.out.println("size of list is::::" +list.size());
CollocatedList listofColl =null;
%>
<tr>
<!--<td valign="top" align="left" width="13%"><input type="checkbox" name="selectedList" id="selectedList"/></td>-->

<% System.out.println("01"); %>
<td valign="top" align="left" width="10%">aaaaaaaa</td>
<td valign="top" align="left" width="5%">cccccccc</td>
<td valign="top" align="left" width="10%">ffffffffff</td>
<td valign="top" align="left" width="10%">hhhhhhhhh</td>
<td valign="top" align="left" width="5%">3333333333</td>
<td valign="top" align="left" width="10%">uuuuuuuuuuuuu</td>
<td valign="top" align="left" width="5%">33333</td>

<% System.out.println("02"); %>

</tr>
<tr>
<!--<td valign="top" align="left" width="13%"><input type="checkbox" name="selectedList" id="selectedList"/></td>-->

<% System.out.println("01"); %>
<td valign="top" align="left" width="10%">aaaaaaaa</td>
<td valign="top" align="left" width="5%">cccccccc</td>
<td valign="top" align="left" width="10%">ffffffffff</td>
<td valign="top" align="left" width="10%">hhhhhhhhh</td>
<td valign="top" align="left" width="5%">3333333333</td>
<td valign="top" align="left" width="10%">uuuuuuuuuuuuu</td>
<td valign="top" align="left" width="5%">33333</td>

<% System.out.println("02"); %>

</tr>
<tr>
<!--<td valign="top" align="left" width="13%"><input type="checkbox" name="selectedList" id="selectedList"/></td>-->

<% System.out.println("01"); %>
<td valign="top" align="left" width="10%">aaaaaaaa</td>
<td valign="top" align="left" width="5%">cccccccc</td>
<td valign="top" align="left" width="10%">ffffffffff</td>
<td valign="top" align="left" width="10%">hhhhhhhhh</td>
<td valign="top" align="left" width="5%">3333333333</td>
<td valign="top" align="left" width="10%">uuuuuuuuuuuuu</td>
<td valign="top" align="left" width="5%">33333</td>

<% System.out.println("02"); %>

</tr>
<tr>
<!--<td valign="top" align="left" width="13%"><input type="checkbox" name="selectedList" id="selectedList"/></td>-->

<% System.out.println("01"); %>
<td valign="top" align="left" width="10%">aaaaaaaa</td>
<td valign="top" align="left" width="5%">cccccccc</td>
<td valign="top" align="left" width="10%">ffffffffff</td>
<td valign="top" align="left" width="10%">hhhhhhhhh</td>
<td valign="top" align="left" width="5%">3333333333</td>
<td valign="top" align="left" width="10%">uuuuuuuuuuuuu</td>
<td valign="top" align="left" width="5%">33333</td>

<% System.out.println("02"); %>

</tr>
<tr>
<!--<td valign="top" align="left" width="13%"><input type="checkbox" name="selectedList" id="selectedList"/></td>-->

<% System.out.println("01"); %>
<td valign="top" align="left" width="10%">wwwwwwwwwwww</td>
<td valign="top" align="left" width="5%">cccccccc</td>
<td valign="top" align="left" width="10%">ffffffffff</td>
<td valign="top" align="left" width="10%">hhhhhhhhh</td>
<td valign="top" align="left" width="5%">3333333333</td>
<td valign="top" align="left" width="10%">uuuuuuuuuuuuu</td>
<td valign="top" align="left" width="5%">33333</td>

<% System.out.println("02"); %>

</tr>
<tr>
<!--<td valign="top" align="left" width="13%"><input type="checkbox" name="selectedList" id="selectedList"/></td>-->

<% System.out.println("01"); %>
<td valign="top" align="left" width="10%">hhhhhh</td>
<td valign="top" align="left" width="5%">cccccccc</td>
<td valign="top" align="left" width="10%">ffffffffff</td>
<td valign="top" align="left" width="10%">hhhhhhhhh</td>
<td valign="top" align="left" width="5%">3333333333</td>
<td valign="top" align="left" width="10%">uuuuuuuuuuuuu</td>
<td valign="top" align="left" width="5%">33333</td>

<% System.out.println("02"); %>

</tr>
<tr>
<!--<td valign="top" align="left" width="13%"><input type="checkbox" name="selectedList" id="selectedList"/></td>-->

<% System.out.println("01"); %>
<td valign="top" align="left" width="10%">00000000000</td>
<td valign="top" align="left" width="5%">cccccccc</td>
<td valign="top" align="left" width="10%">ffffffffff</td>
<td valign="top" align="left" width="10%">hhhhhhhhh</td>
<td valign="top" align="left" width="5%">3333333333</td>
<td valign="top" align="left" width="10%">uuuuuuuuuuuuu</td>
<td valign="top" align="left" width="5%">33333</td>

<% System.out.println("02"); %>

</tr>
<tr>
<!--<td valign="top" align="left" width="13%"><input type="checkbox" name="selectedList" id="selectedList"/></td>-->

<% System.out.println("01"); %>
<td valign="top" align="left" width="10%">11111</td>
<td valign="top" align="left" width="5%">22222</td>
<td valign="top" align="left" width="10%">ffffffffff</td>
<td valign="top" align="left" width="10%">hhhhhhhhh</td>
<td valign="top" align="left" width="5%">3333333333</td>
<td valign="top" align="left" width="10%">uuuuuuuuuuuuu</td>
<td valign="top" align="left" width="5%">33333</td>

<% System.out.println("02"); %>

</tr>
<% System.out.println("777777777"); %>
</table>
<div id="pageNavPosition"></div>

<script type="text/javascript">
var pager = new Pager('results', 2);
pager.init();
pager.showPageNav('pager', 'pageNavPosition');
pager.showPage(1);
</script>



<% System.out.println("8888888888888"); %>
<% List validFunction = (List)request.getSession().getAttribute("validUser");%>
<% if(validFunction != null){
if(validFunction.contains("COLLOCATED_ACTLS")){ %>
<br>
<input type='button' name='Add' value='Add Row' onclick="addRow('addtab')" />   
<input type='button' name='DeleteRow' value='Delete Row' onclick="deleteCollocatedRow('addtab')" />   
<input type='button' name='Delete' value='Delete' onClick="deleteCollocatedActls();"/>   
<input type="button" id="btnContinue" value="Save/Update" onClick="saveCollocatedActls();" />
<% }} %>
</html:form>
14 years ago
Hi,
Is there anyway to load javascript in stuts application JSP.i am using the below javascript stuff.It works well with normal JSP and html, but in struts JSP its not getting called.Is the anyway to achieve in struts.Even body onload function not works with struts.
<script type="text/javascript">
var pager = new Pager('results', 2);
pager.init();
pager.showPageNav('pager', 'pageNavPosition');
pager.showPage(1);
</script>

Thnx in advance.
14 years ago