Results 1 to 2 of 2

Thread: .jsp question! Help!

  1. #1

    Thread Starter
    Member Evolute's Avatar
    Join Date
    Sep 2002
    Location
    Portugal
    Posts
    58

    .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!
    Evolute

  2. #2
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228
    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
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width