jquery - Javascript access object variables from functions -
function init_exam_chooser(id,mode) { this.id=id; this.table=$("#" + this.id); this.htmlroworder="<tr>" + $("#" + this.id + " tbody tr:eq(0)").html() + "</tr>"; this.htmlrownew="<tr>" + $("#" + this.id + " tbody tr:eq(1)").html() + "</tr>"; $("#" + this.id + " tbody tr").remove(); //arxikopoiisi var rownew=$(this.htmlrownew); rownew.find("input[type='text']").eq(0).autocomplete({ source: function (req,resp) { $.ajax({ url: "/medilab/prototypes/exams/searchquick", cache: false, datatype: "json", data:{codename:req.term}, success: function(data) { resp(data); } }); }, focus: function(event,ui) { ...