Hello,
I'm trying to use the Form API to verify if the Filename has the .dcr extension.
If it doesn't have a .dcr, to kick off an error stating to add the .dcr after the file name.
This is my code:
---------------------------------------------------------------------------------------------
<script>
<![CDATA[
function init()
{
IWEventRegistry.addFormHandler("onSaveNameSpecified", checkDcrName);
function checkDcrName(name) {
if (IWDCRInfo.getDCRName().match(/\.dcr$/) ) {
debug('Name already set: ' + IWDCRInfo.getDCRName());
} else {
alert('Your file should have an extension ending with .dcr\ filename.dcr');
return (false);
}
}
]]>
</script>
-----------------------------------------------------------------------------------------------------
This code doesn’t do anything, and I can’t figure out what’s wrong.
I have been going over interwoven documentation and it doesn’t help at all.
Can anybody help me?
Edited by Angelia on 12/05/05 09:37 AM (server time).