As Filipe Silva had mentioned it, first, you have to change your option's code to a valid html code.
Your JS code is good. May be the problem is that it is executed before the selects are loaded. So I suggest you to use jQuery library which will ensure that the DOM is fully loaded before executing your code.
I suggest you too, to wrap your code within {literal} tags so it will be displayed as-is and not interpreted by Smarty.
Your code would be :
{literal}
<script type="text/javascript">
$(document).ready(function(){
var periode = $("#lieferperiode").find(":selected").val();
var anzahl = $("#menge").find(":selected").val();
var link = "http://XXXXX.de/XXXXX.php/sViewport,checkout/sAction,addArticle/sAdd," + periode + "/sQuantity," + anzahl;
alert(link);
});
</script>
{/literal}