iluvperl
Programmer
- Jan 22, 2006
- 107
I was looking how to get a form to launch a new window and found this working code.
What is the first brackets I used for 'hi there' used for? And what about this.target? When my window launches, it launches a page that doesn't exist and then redirects to my script. I am sort of confused at why it's doing that.
Code:
<form action="" target="newFormWindow" onsubmit="window.open('hi there', this.target, 'width=685,height=500')">
What is the first brackets I used for 'hi there' used for? And what about this.target? When my window launches, it launches a page that doesn't exist and then redirects to my script. I am sort of confused at why it's doing that.