Value on a ui slider

CherryD

New Member
I have this code for one slider and the structure appears correctly but when i move the slide , don't show the value of the answer inside of the input box "amount", appears "undifined" and i don't know why because when you inspect you can see that the div slider have a value in the tag name . I tryed with the html tag "value" too and didn't works too. What can i do ?\[code\]< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">< head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> < title> Questionnaire </title> < meta name="Description" content="Questionnaire on business model" /> < script src="http://stackoverflow.com/questions/13861332/jquery-1.8.3.js" type="text/javascript"></script> < script src="http://stackoverflow.com/questions/13861332/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8">< /script> < script src="http://stackoverflow.com/questions/13861332/jquery.validationEngine.js" type="text/javascript" charset="utf-8">< /script> < link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" /> < script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js">< /script> < script src="http://stackoverflow.com/questions/13861332/jquery-ui-1.9.2.js"></script> < script src="http://stackoverflow.com/questions/13861332/factaris.js"></script> <link rel="stylesheet" href="http://stackoverflow.com/questions/13861332/STYLE.css" type="text/css" media="screen" /> < script> jQuery(document).ready(function(){ ///SLIDER !!!!!!!!!!!!!!!!!!!!!!!!!!! $( "#slider" ).slider({ slide: function( event, ui ) { //$( "#amount" ).val( "$" + ui.value ); // show range 0-100 without ini values !!!!! // $( "#amount" ).val( "$" + this.value ); //show undefined // $( "#amount" ).val( "$" + 8); // show 8 all time $( "#amount" ).val( "$" + ui.name ); } }); }); < /script> </ head> < body> < div id="sizer"> < form id= "formID" name="formID" class="formular" method="post" action= "<?= $url = "QUESTIONAREFINISHING.php"; ?>" accept-charset="utf-8"> <div id="questionare" > ... ... ... <!--SLIDER--> < ?php if($row_questionset['Constructor']=="Slider"){?> < div> < label class="desc" value= "http://stackoverflow.com/questions/13861332/<?php $row_questionset['QuestionIDFKPK'];?>" > <?php echo $row_questionset['QuestionValue']; ?> < /label> /div> <? php while ($row_Answer=mysql_fetch_array($AnswersValue)){ ?> < p> < label for="amount"><?php echo $row_questionset['QuestionValue']; ?></label> < input type="text" id="amount" name="amount" /> < /p> < div id="slider" name="<?php echo $row_Answer['AnswerValue']; ?>" >< /div> <?php } ?> <?php } ?> <!--/SLIDER--> .... ..... ............ </ div> </ form> </ body> </ html>\[/code\]
 
Back
Top