I have this code:
if ($('#txtEdit').val == '') {
window.parent.$('#note' + appid + dbid).html('<img src="images/note_gray.png">');
} else if ($('#txtEdit').val != '') {
window.parent.$('#note' + appid + dbid).html('<img src="images/note.png">');
};
I've also tried it with a simple "else" instead of the "else if". I have also tried val(null) instead of val == ''. In all instances, it will work one way, but not the other. For example, as it is now (above) if I put something in the text box (txtEdit) it will set the div to note.png. However, emptying the textbox will not change it to note_gray.png.
I am new to jquery/javascript. Sorry.