javascript - Created QUERY, need data to display inside drop down -


i trying modify webpage right uses php , html.

basically have list of items generated. values 1, or 10 depending on row length.

beside each list item have "delete" button, right have working delete need create confirmation dialog pop up.

everything works, reason first button in list id goes javascript launches.

in essence, after php loop runs, have line of code on html page 5 times.

<input type="button" id="btnshowsimple" value="simple dialog" /> 

my javascript looks when "btnshowsimple" clicked, reason first 1 has function assigned it, when have same id?

generate unique id's say

$i=1; foreach($result $row) { echo '<input type="button" class="btnshowsimple" id="dialog['.$i.']" value="simple dialog" />'; $i++; } 

now use javascript see if class btnshowsimple clicked elements id , can whatever intend do.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -