I have a view acting differently for GET and POST methods and I have the following template for a page containing 2 links to the corresponding URL
<!DOCTYPE html>
<html>
<head>
<script language="JavaScript" type="text/javascript">
function getsupport ( selectedtype )
{
document.create_station.supporttype.value = selectedtype ;
document.create_station.submit() ;
}
</script>
</head>
<body>
<h1> Hey {{ object.username }}! </h1>
<p><a href="{% url 'list_create_station' %}">View your stations</a> </p>
<form name="create_station" method="post" action="">
<input type="hidden" name="supporttype" />
<a href="{% url 'list_create_station' %}">Create a new Station</a>
</form>
</body>
</html>
I am trying to make the second link pass a POST method instead of GET with help from code at http://www.thesitewizard.com/archive/textsubmit.shtml
But the link still passes a GET, verified it using Chromium developer tools.
I am a novice and hence have literally copied the code from the reference. I understand bits and parts so please someone give an answer accordingly. It would be lovely if someone tells me exactly what I am doing wrong here and explain to me what changes exactly I have to make.