Hi!!!!!
U can call ur jsp functions in a jsp page only when an action is performed.
like kill focus onClick, onSubmit etc.
For example:This is an example code of one of my jsp's
<jsp:useBean id="adminaccount" scope="session"
class="HSBean.HSAdmin.HSAdminAccount" />
<HTML>
<HEADER>
<link rel=stylesheet href="../../../stylesheet/admin.css">
<%@ include file="../admin_header.jsp" %>
<SCRIPT language=JavaScript>
function checkform()
{
var result = false;
result = checkvalues();
if(result)
{
result=checkpassword();
if(result)
{
result=checkmail();
}
}
return result;
}
</SCRIPT>
....
.
.
.
.
<FORM name="adminaccount" action="account_details_process.jsp?Operation=<%=
operation %>&eMail=<%=sOldEmail %>" onSubmit="return checkform()"
method="POST">
.
.
.
.
.
<input type="submit" name="submit" value="Update">
</FORM>
Put everyhting to be showed in the form ibetween the <FORM> and </FROM>
tags.
And whenever your you form will be submited by licking on the submi button
your function will be called before the form is submited and hence your
validations will be done.
u can call the function like this also
onClick="checkmail(<value>)"
and declaration of the function will be like this
function checkmail(idmail)
{
.
.
.
.
.}
I hope this example was of some help to u.
-Tamanna
subramanian Athimoolam <[EMAIL PROTECTED]> on 06/12/2000 10:25:35 AM
Please respond to A mailing list about Java Server Pages specification and
reference <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Kher Tamanna-SWD-ITIL-UB/Itilmail)
Subject: Re: HTMLEncode in JSP
hi !
how can i call the javascript function in my jsp file. i want to
pass the parameters also .
advance thanks,
subu
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets