0

Hi,everybody,
i have this code,what is the problem.button clcik nothing to display,

i want to button click display label and textbox.

$(document).ready(function(){
$("#planbar").click(function() {
var html="";
var i=0;
var display=" ";
/*var numitem = $(this).val; if(numitem>5) numitem=5;
alert(numitem);
for(i=1;i<=numitem;i++) {*/

html+="<div><b>Planbar</b> </div>" +

"<div class='field'>" +
 "<span style='width:115px;float-left;text-align:right'>Where:</div>"
"<div>"
;
// }

$("planbars").html(html);
});
});
         <input type="button" id="planbar" value="+ "  />
           <div id="planbars" style="float:left;width:150px;margin-left:20px;height:210px;overflow-y:scroll;border: 1px solid black;">
</div>

Thanks

Edited by diafol: Keep js in the js forum

4
Contributors
6
Replies
8
Views
5 Years
Discussion Span
Last Post by suneel.gupta
0

hi blockblue,

i changed that line but still nothing to response.
plz help me.

0

You're missing another plus at the end of line 13.

Correct that and then post any JavaScript errors you're seeing.

0

yah his right missing my advice to see the client side code error like javascript press control+shift+j

0

hi, blockblu,

Thank you very much solved my problem.
and Thanks to everybody,

0

$("#planbar").click(function() {

replace this line to
$("#planbars").click(function() {

you have missed type the id of div

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.