javascript - Can't post value to next HTML-document with hidden input -
i'm trying post value html-document hidden input. want recieve value location.search , in new html-document. problem doucment opening, value isn't sent. here html:
<form action="britzcwka.html" method="post" id="formid"> <input id="inpt" type="hidden" name="myinput" value=""> </form>
and here javascript-code:
document.getelementbyid("inpt").value = somevalue; alert(document.getelementbyid("inpt").value); document.getelementbyid("theform").submit();
the alert shows right value, address url britzcwka.html when on other page.
hank
you're using post method, variables not included in browser's address bar. alter form's method
get
:
<form method="get" action="britzcwka.html" id="formid"> <!-- form's content --> </form>
javascript html
No comments:
Post a Comment