Forum Moderators: open
My script contains a form as follows:
<form action="" name="nextpageform" method="post">
.
.
</form>
Then I have a link with onclick events.My intention is that the form be submitted by a click on that link, and action be set to the href attribute of the link. This is what I tried but I guess it is wrong:
<a href="URL string with php variables" onclick="document.nextpageform.action=this.href;document.nextpageform.submit();">link</a>
How do I fix it?
Thanks.