javascript submit form and onsubmit event problem

Hello!
I have that kind of code:
<html>
<body>
<a href="#" onclick="javascript:document.tynd.submit();">TYNG</a>
<form name="tynd" method="GET" action="http://www.tv.ee/static/manager/pildid/console/evideo/test1.asp" target="judges" onsubmit="window.open('about:blank','judges','width=333,height=612,menubar=no,toobar=no,scrollbars=no,resizable=no')">
<input type="hidden" name="id" value="339">
<input type="hidden" name="type" value="kodu">
<input type="hidden" name="evideo" value="true">
<input type="hidden" name="data" value="lisatud">
<input type="hidden" name="popup" value="haha">
<input type="hidden" name="action" value="tere">
<input type="Submit" name="Submit">
</form>
</body>
</html>

When I click on the submit button then onsubmit is also included but when I click on the text link then onsubmit in not taken
How to solve this problem????
PSERKAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

knightEknightCommented:
<a href="#" onclick="document.tynd.Submit.click();return false;">TYNG</a>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
knightEknightCommented:
be careful never to name your submit buttons "submit" as you will overwrite the form's submit() method.  In this case you named it "Submit" instead of "submit" so you are ok.
0
knightEknightCommented:
also, you should return true from the onsubmit if you want the form to submit (otherwise return false) ...

onsubmit="window.open('about:blank','judges','width=333,height=612,menubar=no,toobar=no,scrollbars=no,resizable=no')return true;">
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

knightEknightCommented:
... but note that from the onclick of the link, I return false instead of true.
0
knightEknightCommented:
another way:

onsubmit="window.open('',this.target,'width=333,height=612,menubar=no,toobar=no,scrollbars=no,resizable=no');return true;">

and oops ... I left out the ; between the end of the open function and return true in the previous post.
0
PSERKAuthor Commented:
But how to make this submit button hidden. I only want to show the text link.
0
PSERKAuthor Commented:
Oh I got it already
<div style="visibility:hidden">
<input type="Submit" name="Submit">
</div>
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.