below code is in my ajax which I have comment.id
which is coming from php as unique id
html += '<div class="rTableRow1"><div class="rTableHead"><input id="button1" type="button" value="action !" />' + comment.id +'</div></div>'
As above full data which be shows a table
I require to click action button where it well take to another page with ID
any one have any idea have to pass a ID in Action button which is in my Ajax.
You can add onclick
event-attribute to button as below:
html += '<div class="rTableRow1"><div class="rTableHead"><input id="button1" type="button" value="action !" onclick="location.href = \'http:\\www.yoursite.com'+comment.id+'\'" />' + comment.id +'</div></div>'
Here, http:\\www.yoursite.com\
can be your URL and append comment.id
as you need to pass with URL to redirect.