submit to a page that only has javascript

M

Matt

When the user submit the form in myform.jsp, it will submit to myaction.jsp. I
want it only pop up test message box without having the browser with myaction.jsp,
which is a blank page. Any ideas??

myform.jsp
==========
<FORM NAME="InputForm" ACTION="myaction.jsp" METHOD="POST">
//html controls
</FORM>

myaction.jsp
==========
<script type="text/javascript">
alert('test');
</script>
 
R

RobM

Matt said:
When the user submit the form in myform.jsp, it will submit to myaction.jsp. I
want it only pop up test message box without having the browser with myaction.jsp,
which is a blank page. Any ideas??

myform.jsp
==========
<FORM NAME="InputForm" ACTION="myaction.jsp" METHOD="POST">
//html controls
</FORM>

myaction.jsp
==========
<script type="text/javascript">
alert('test');
</script>

Matt, why bother with the javascript; if you want to test submitting one
page to another, just change myaction.jsp to say "Hello I'm in myaction.jsp"
in html markup and you'll see it on the browser screen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top