Not sure exactly what to ask here, so please be patient.
I have an input field, and i need to grab the onfocusin and onfocusout events and perform some logic.
I would like to use a single common function to handle the onfocusin, and a common function to handle the onfocusout function.
So - how would i determine the ID of the input field within the functions?
<input type="text" class="form-control" id="location_notes" onfocusin="fieldFocusIn()" onfocusout="fieldFocusOut()" placeholder="Location Notes">
<input type="text" class="form-control" id="additional_notes" onfocusin="fieldFocusIn()" onfocusout="fieldFocusOut()" placeholder="Additional Notes">
function fieldFocusIn(){
// do some stuff with the calling field
}
function fieldFocusOut(){
// do some different stuff with the calling field
}