aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes javascript in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "javascript in JSP" Watch "javascript in JSP" New topic
Author

javascript in JSP

Golla Vensiri
Greenhorn

Joined: Aug 05, 2004
Posts: 10
Hi,

Iam getting "object expected error" when running this JSP file in Tomcat, at the point where i called validateRMDealerContacts(). In the code given below i called validateRMDealerContacts() in th if statement. Can anyone pls help me.

<script language=javascript src="RMDealerContactsValidation.js" type="text/javascript"></script>

<SCRIPT language=Javascript>
function submitForm()
{

if(validateRMDealerContacts())/*This function is there in RMDealerContactsValidation.js */
{

--------
}
}
</SCRIPT>
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
(MOVE TO HTML/JavaScript)

Problem is something you are calling is not loaded when the script runs.

Object expected usually coccurs when the element does not exist on the page.

Eric
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

As Eric requested, I am moving this thread to the HTML/Javascript forum.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Golla Vensiri
Greenhorn

Joined: Aug 05, 2004
Posts: 10
Hi Eric,

Thanks for u'r suggestion.

iam getting the same when i replace <script language=javascript src="RMDealerContactsValidation.js" type="text/javascript"></script>

tag with jsp include directive tag.
<%@ include file="RMDealerContactsValidation.jsp" %>

i kept the .js files and .jsp files in the same folder

any suggestions??
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
When is the error occurring and when is the script being called.

I am sure that the JS file is loading from the directory, the problem should be the elements on the page in general.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javascript in JSP