0
newTextBoxDiv.after().html('<div id="hoteldiv' + counter + '">'+'<input type="text" name="tripdetails[0][hoteldetails][' + counter + 
          '][name]" id="textbox' + counter + '" value="" >'+
          '<input type="text" name="tripdetails[0][hoteldetails][' + counter + 
          '][number]" id="textbox' + counter + '" value="" >'+
          '<input type="text" name="tripdetails[0][hoteldetails][' + counter + 
          '][address]" id="textbox' + counter + '" value="" >'+'<br><br>'+
          '<input type="text" name="tripdetails[0][hoteldetails][0][contact][' + counter + 
          '][name]" id="textbox' + counter + '" value="" >'+
          '<input type="text" name="tripdetails[0][hoteldetails][0][contact][' + counter + 
          '][number]" id="textbox' + counter + '" value="" >'+'</div>'
          +'<input type=button value="Add Con" id="addcon' + counter + '">'+
'<input type=button value="Remove con" id="removecon' + counter + '">');

I am not getting value of addcon1 or not getting value click on addcon1

     $("#addcon1").click(function () {
        alert("demo");
        });
3
Contributors
4
Replies
18
Views
2 Years
Discussion Span
Last Post by ihelpyou
0

hi ramsiva,

one more test have to check

please check how many addcon1 elements existed in your outputted html?

in the above code click event not works fine if html contains more than one addcon1 or else nothing found.

check it once

This topic has been dead for over six months. 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.