how set on click button value?
in html form set of users each having separate id. users auto generated, if new user register means come list. along kept 1 button "invite". button id setting whole users. if kept on click button alert, sets whole users alert msg.
ex: if john 1 user , have id 5,if click john's invite button means, users alert coming. need if john's invite click means john has invited not users.
how compare these user id , button id?
here code:
<script> $(document).ready(function(){ $(".inviteteacher").click(function(){ alert('invited'); }); }); </script> <div class="thumb_section bx-def-margin-sec-right"> __thumbnail__ </div> <div class="button_wrapper"> <input type="button" value="invite" name="inviteteacher" class="inviteteacher" id= "inviteteacher"/> </div>
here thumbnail user information.
store values in hidden inputs.
<form> <input type="hidden" name="from_id" value="1"> <input type="hidden" name="to_id" value="5"> <input type="submit" value="invite"> </form>
Comments
Post a Comment