[jQuery] .Change handler on Select element resets input Form
I attach a change handler to a Select List. When the user selects a
list entry I use Ajax (.ajax) to query whether this entry requires
special acknowledgement. If it does I create an absolute positioned
div over the page and request that the user click a link to close it.
I attach a click handler to the anchor on this popup div. When
clicked, I fade out the popup div. When the div disappears all form
elements (form containing the select) are reset. I need to retain the
change the user just made to the list.
The code that creates the popup on success return from the .ajax is:
$('<div id="jqDisclaim_dialog"></div>')
.css({
position: 'absolute',
left: ($(window).width()-100)/2,
top: ($(window).height()-300)/2,
display: 'none'
})
.html(data)
.addClass('flyoutDialog')
.appendTo('body')
.fadeIn(3500);
Whenever this div is removed, my original form is rest. Anyone know of
a way to stop the list from reseting?