Dynamic assigned var name for slider

Hi there,
I´m trying to assign a name for my slider inside a asp loop to populate a list of slider each linked to a form input…
If I leave the var name parameter without the dynamic value the sliders are populated but not linked to the inputs (probably due init() duplicate name)
Any help is welcome.

My loop function is building the sliders like this:
Response.Write “”
Response.Write “”
Response.Write “

<input name='registros_pg” & pergunta&opcao & “’ type=‘text’ value='”
Response.Write resposta & “'”
Response.Write " onchange=document.form_paginacao.parm_req.value=‘submited’;>"
Response.Write “
  Response.Write "<script> var slider = new dhtmlxSlider('parentId" & pergunta&opcao & "', 200);"
  Response.Write "slider.init();"
  Response.Write "slider.setMin("&min&");"
  Response.Write "slider.setMax("&max&");"
  Response.Write "slider.linkTo('registros_pg" & pergunta&opcao & "');"
  Response.Write "slider.setValue("&resposta&");"
  Response.Write "slider.setStep("&step&");"
  Response.Write "</script>"

Could you provide us completed demo to test it locally?
docs.dhtmlx.com/doku.php?id=othe … leted_demo

Hi there,

My page is server side coded…

The issue is how to assign dynamic identifier to slider var and div used to populate sequential sliders into page.
In my page, I have a survey using likert values (option inputs) and the slider to collect voter opinion for term value in a context.


you are passing input name into linkTo method. And there should be an input id.

You should either rename <input name=‘registros_pg" & pergunta&opcao & "’ to <input id=‘registros_pg" & pergunta&opcao & "’ or just add “id” attribute to the input.