By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,567 Members | 1,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,567 IT Pros & Developers. It's quick & easy.

help for jsp

P: 4
hi i am displaying last 100 lines of log file on jsp in textarea and after every 10 second jsp will be refresh and data of text area will be changed i have done this things now i have to add two button on jsp one for display old 100 line before current text area and my code is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<meta http-equiv="refresh" content="10">

<script type="text/javascript">
function message() {
document.getElementById("Master").scrollTop=docume nt.getElementById("Master").scrollHeight
function display() {
document.write("<TEXTAREA name="Master" ROWS="30" COLS="90" READONLY SCROLL="bottom"> <%=session.getAttribute("logMessage1")%></TEXTAREA>");
document.getElementById("Master").scrollTop=docume nt.getElementById("Master").scrollHeight

System.out.println ("\n ENTERING :=> Log JSP");

<!--<body bgcolor="white" topmargin="0"> added on 25/02/06

<BODY bgcolor="white" TOPMARGIN=0 LEFTMARGIN=1 MARGINHEIGHT=0 MARGINWIDTH=0 onChange="message()">

<form name="Log">
<% String logMessage = (String)session.getAttribute("logMessage");
if(logMessage == null)
logMessage = "";

<TEXTAREA name="Master" ROWS="30" COLS="90" READONLY SCROLL="bottom">

<BUTTON TYPE=BUTTON FONT COLOR=BLUE onClick="this.disabled=1,display1()"><B>Previous</B></BUTTON>

<% System.out.println ("\n EXITING :=> Log JSP"); %>

and i m getting error object expected
plz help me
Sep 13 '06 #1
Share this Question
Share on Google+
1 Reply

P: 15
hi Sonoo

I think you mis-named or mis-called your function

use function display1() { instead of function display() { inside the script tags

I think that solves the problem.

Willing to help more if needed.

Nov 2 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.