[HTML] How to manage multi target in one form

D

delphimania

Hi !

(Excuse my accent, i'm french -;)

I have a form like this

<form action="MyCGI.exe?" method="post" name="form1" target="?????">
My Form: First choice :
<input type="submit" name="Submit" value="Submit with _self target">
Second choice :
<input type="submit" name="Submit2" value="Submit with _blank target">
</form>

I would like browser to stay in same page if the first button is clicked,
and to open a new window il th second button is clicked.

Is there a possibility for this, for example with javascript function ?

I thought to make two independant Forms, but it's wrong because same
elements have to be transfered to CGI however button is clicked

Thanks for yous help

Chris
 
B

brucie

in post: <
delphimania said:
I would like browser to stay in same page if the first button is clicked,
and to open a new window il th second button is clicked.

use your server side script to send the page you want depending on which
submit button was pressed. easy peasy.
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top