-1

I need to redirect to two pages in one button click. Is it possible? And this is what I tried. Using this code I can go to one page only.

 <form action="http://195.678.99.00:5002/predict" action="www.mywebsite.com" id="usrform" method="post" enctype="multipart/form-data" target="_blank">
<button id="myButton" type="submit" class="button button5"  >View pages</button>
</form>

1 Answers1

-1

Get rid of the form tags, keep the button only:

<button onclick="window.open('http://195.678.99.00:5002/predict'); window.open('www.mywebsite.com');">View pages</button>

Be aware it won't work in all browsers because of popup blockers, as stated in the comments of this answer: https://stackoverflow.com/a/7065030/4810180

sed lex
  • 70
  • 1
  • 9