simonTheTraveller
Programmer
I created a validation routine held inside a separate js file so when all the different files (I'm working in jsp) forms were submitted they would be validated using this file.
It was working before with the following code:
<script language="javascript" src="../validation/checkAmount.js"></script>
The checkAmount file is located inside the validation directory which is held in the directory above where all the files are. All the files are located inside life_insurance/files.jsp
However, whenever I submit the form using the following:
<form action="return checkAmount(formElement)" ...
it doesn't find the file and just goes onto the next page. checkAmount() is the name of a function inside the file itself. I've tried creating dummy functions inside the file to just display alert boxes, but nothing!!!
This is just driving me crazy because previously it was WORKING!
The only thing I can think of is that its not pointing to the right file so I put the validation file inside the same directory as the jsp file so the script line read <script src="checkAmount.js"> but it still didn't work.
PLEASE HELP ME.
It was working before with the following code:
<script language="javascript" src="../validation/checkAmount.js"></script>
The checkAmount file is located inside the validation directory which is held in the directory above where all the files are. All the files are located inside life_insurance/files.jsp
However, whenever I submit the form using the following:
<form action="return checkAmount(formElement)" ...
it doesn't find the file and just goes onto the next page. checkAmount() is the name of a function inside the file itself. I've tried creating dummy functions inside the file to just display alert boxes, but nothing!!!
This is just driving me crazy because previously it was WORKING!
The only thing I can think of is that its not pointing to the right file so I put the validation file inside the same directory as the jsp file so the script line read <script src="checkAmount.js"> but it still didn't work.
PLEASE HELP ME.