Forum Discussion
37 Replies
- _anomDiebolt_Qrew ElitePlease post your question in a new thread since you are beyond the Scooby Doo. If it involves script run it through http://jsbeautifier.org/ (with two spaces indention) and paste it into pastie http://pastie.org/ (and select JavaScript as the language). Try and post the minimal amount of code that is relevant to the question at hand.
- ArchiveUserQrew CaptainIf I put this on an edit form page, is there a way to capture the previous value of the field?
- _anomDiebolt_Qrew EliteYes.
But the previous values of a field is actually stored in the edit page form in a hidden field named _oval_fid_6.
oval stands for "old value" which is actually the "current value" until the form is actually submitted. - ArchiveUserQrew CaptainI have run into a snag with grabbing old and new values when it comes to the checkbox. It seems the new value of the checkbox input field is always "on"? Do you know a way to get the new checkbox value when I uncheck?
- _anomDiebolt_Qrew EliteThis code will return true if the check box is checked and false otherwise:
$("#_fid_6").is (":checked")
In other words you don't use $("#_fid_6").val () to get the value of a checkbox. - ArchiveUserQrew Captaindoh! I knew that. Thanks for the reminder!
- _anomDiebolt_Qrew EliteDid you know that this works to:
_fid_6.checked
Try it - it will evaluate to true of false - ArchiveUserQrew CaptainVery cool! I was using jquery's .is('checked') but I think I will use that instead.
- _anomDiebolt_Qrew EliteYou can get the value of any field with similar code:
_fid_6.value
It may seem magical but all modern browsers create a global variables that correspond to the id attributes placed on elements. This global variable represents the DOM node and taking the .value property is just getting the value of the control. - ArchiveUserQrew CaptainHow about detecting if the user hits delete record? Can that be detected? and say get record id and user who did it?