Hi,
Could any body post the sample code how to use setDCRName?
Here is my code it is not working.
function handle_saveNameSpecified(path)
{
valid = true;
sname = path.substr(path.lastIndexOf("/data")+6,1);
cond = true;
cond = sname.match(/^[A-Za-z]$/)
if(!cond)
{
alert("DCR NAME SHOULD START WITH ALPHABETICS.Press Save again ");
return(false);
}
if ( path.lastIndexOf( "." ) > -1 )
{
ext = path.substring( path.lastIndexOf( "." ) + 1, path.length );
if ( ext == "asp" || ext == "aspx" || ext == "htm" || ext == "html" || ext == "jsp" || ext == "dcr" )
{
alert( "Do not specify an extension for the file. Press Save again." );
return( false );
}
}
if ( valid )
{
regex = new RegExp( "^(.*)([&% ])(.+)$" );
list = regex.exec( path );
if ( list != null && list != undefined )
{
valid = confirm( "The specified file name contains characters (spaces, &, %, etc.) that are not suggested for web file names. Press Cancel and save again to change the file name, or press OK to ignore this warning." );
}
}
if (valid)
{
dcr = path.substring( path.lastIndexOf( "/" ) + 1,path.length );
var area = parent.gWorkarea;
area = area+'';
area = area.substring(area.lastIndexOf( "/" ) + 1,area.length );
path = path.substring(0, path.lastIndexOf( "/" ) + 1);
name = area+'_'+dcr;
path = path+name;
IWDCRInfo.setDCRName(path);
}
return( valid );
}
Thanx in advance
Edited by krishna1288 on 06/25/03 11:51 AM (server time).