Programming Question
- Started
- Last post
- 3 Responses
- koko
I have a form in HTML (subscribe to a feed by email, simple single textfield) that when you press submit opens a page with info and so forth.
This new page opens in the same browser window and I want it to open on a new window woth specific higth and width. I know how to apply the javascript to a normal link, but how can I do it to a form? Can't attach it to the button!!
Thanks guys
- acescence0
form action="whatever.html" target="foo" onSubmit="window.open('', 'foo', etc..
- koko0
Ok, so I think I almost get it. Just a couple of questions:
This is what i have:
Action="http://www.page.html" target="Subscribe" onSubmit="window.open('Subscribe...What do I have to put in target? _blank? the name of the window? (subscribe?).
Sorry bro and thanks so much for the help.
- acescence0
target should be the name of the window you are creating with window.open, so yes, 'subscribe' in this case. one thing though, you need to have empty quotes for the first property here:
onSubmit="window.ope n('','Subscribe', etc..
NOT
onSubmit="window.ope n('Subscribe', etc..
the difference is the '', before 'Subscribe'