|
-
September 17th, 2004, 08:38 AM
#1
embed java within javascript
Here is my problem.
On my jsp, I have some java code.
When I get a certain exception in java, I want to display a confirm box to the user (currently using javascript). Based on what is returned from the user I want to perform an action using java.
I am thinking the code should look something like this:
<script type="text/javascript">
<!--
var answer = confirm ("Are you having fun?")
if (answer)
***PERFORM SOME JAVA CODE***
else
***PERFORM SOME JAVA CODE***
// -->
</script>
Is something like this possible? Can someone provide me with the correct syntax?
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|