I am using a software called Optiview to make a form for accounting purpose. I have a signature field that looks like a button but has different properties. When the person who has to sign that form press that button, it automatically opens a dialog giving to the user the opportunity to agree with the info that is on the form. If the user accept it, it will stamp the user name, date and time it was accepted. What I am trying to do is validate if that button has info or not before submitting the form, but code below always returned me empty("") or undefined, even if the field has been stamped with the signature. If more details are required please let me know.
Code: always return empty
var signature = $(Reviewer).attr('id');
var signvalue = $(signature).text();
if (signvalue == "")
{
CSClient.alert("Please sign before submitting invoice!")
return false;
}
Code: always return undefined
var signature = $(Reviewer).attr('id');
var signvalue = $(signature).val();
if (signvalue === undefined)
{
CSClient.alert("Please sign before submitting invoice!")
return false;
}
Any help will be really appreciated
PD: I am new using jquery/javascript, so please try to explain me with more details as possible.
Thank you