lexexpert,
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<input type="text" value="asd" id="pid">
<div id="pshow"></div>
<script>
var pid = $("#pid").val();
$("#pshow").html("<select name='"+pid+"' class='text' size='1'><option value=''></option></select>");
</script><script>alert(document.getElementsByTagName("select")[0].name);</script>