I am using bottle framework to dynamically list a link for editing a task, rows is a collection of tuple with multiple (id, task, status) logically the code below should give the first link
http://localhost:8217/edit/1
second link
http://localhost:8217/edit/2
so on and forth
but all the link are
http://localhost:8217/edit/5
therefore I suspect this has to do with the order the code is executed, any hint would be much appreciated
<p>The open items are as follows:</p>
<table border="1">
%for row in rows:
<tr>
%for col in row:
<td>{{col}}</td>
%end
<script language="javascript">
var number = "http://localhost:8217/edit/";
var key = {{row[0]}};
console.log(key);
</script>
<td>
<a href="" onClick="location.href=number +key;return false";>Editing</a>
</td>
</tr>
%end
</table>
hrefs directly?