-
.jsp question! Help!
I'm using a jsp which has this code, only:
Code:
<%@page import="java.text.*" %>
<%@page import="java.util.*" %>
<%@ page contentType="text/html;charset=windows-1252"%>
<HTML>
<BODY>
<TEXTAREA name="textarea" rows=12 cols='15' style="TEXT-ALIGN: right"></TEXTAREA>
<BR>
<INPUT value='0' type="text" onBlur="numFormat(txtbox.value)" name="txtbox">
</BODY>
</HTML>
As you can see I have a numFormat() function .. but I want to have this function in an external file. Which extension should this file be? .class? .js? or other? And how can I connect the .jsp code to the external file?
Thanks!
-
You would need a client - side script. This means .js file.
However you would also need to include the .js file in your code.
Code:
<script language="javascript" src="num.js"></script>
I hope that answers your question.
Cheers!
Abhijit