Hello,
i Have the function below to ad a certain amount of dropdown lists to a form.
It works like a charm but i want to add the input_id var to the dropdown list created in the "data" array
"'_1': '13 x 18 cm'," must become "input_id '_1': '13 x 18 cm',"

I can't get it together.

function getval(sel) {
var input=sel.value.split("_");
var input_aant = input[1];
var input_id = input[0];
var input_name = "#"+input[0];

$(input_name).empty();

for (i=1; i<=input_aant; i++)
{
var data = {
'_1': '13 x 18 cm',
'_2': '20 x 30 cm',
'_3': '40 x 60 cm',
'_4': '50 x 75 cm'
}

var g = $('<div class="formaat"/>');
var s = $('<select onchange=\"getalert(this);\" />');

for(var val in data) {
$('<option />', {value: val, text: data[val]}).appendTo(s);
}

g.appendTo(input_name);
s.appendTo(input_name);
}
}