Reputation: 302
I want to send a value while submitting a form using javascript. Due to some programming limitations I can't use functions. so can I give two values in a single argument like this?
<form name="editDelete" ...>
<input type="hidden" name="theParam"/>
...
<a href="#" ... onclick="document.editDelete.theParam.value = 'the value'; document.editDelete.submit();">Test</a>
Or is there any way to submit the form sending a value using single command in <a href>
tag itself?
Upvotes: 0
Views: 89
Reputation: 4189
Try this final solution;
<form id="editDelete" ...>
<input type="hidden" id="theParam" name="theParam"/>
<a href="#" onclick="document.getElementById('theParam').value = 'thee value'; document.getElementById('editDelete').submit();">Test</a>
Upvotes: 1
Reputation: 500
Can you use GET method in the form? here is an example
<A HREF="../form.html?value1=West&value2=East>2 values</A>
Upvotes: 0