i want to know how to run two functions in the same page in jsp
A:
what i want is if i have a function called checkForm() and i have another function called taking(), in the same page and i want to call both function in the same page
ARe they JavaScript functions or JSP functions? That's where it gets confusing. You can edit your own post. You don't need to post an answer in order to clarify your question.
Pablo Santa Cruz
2009-04-29 21:04:39
A:
There is nothing stopping you from including whatever client-side JavaScript you want in a JSP:
<script type="text/javascript" src="file_containing_checkForm.js"></script>
<script type="text/javascript" src="file_containing_taking.js"></script>
Or:
<script type="text/javascript">
function checkForm() {
// ... your code ...
}
</script>
<!-- more markup -->
<script type="text/javascript">
function taking() {
// ... code ...
}
</script>
Or you can have both functions in the same external file, or both in the same set of inline <script>
tags. Or some combination of any or all of these ways of including client-side JavaScript on a web page.
If you need more help than this, you'll have to edit your post to include a code snippet of what you are trying to do, including a description of what you expect to happen and what is actually happening and how those two things differ.
Grant Wagner
2009-04-29 21:35:42