>cList = FILETOSTR(ALLTRIM(Thisform.fileNAME.Value)) && change to Str > >IF AT(UPPER('function hp_dn(a)'),UPPER(cList)) = 0 && check whether add before > cAdd=FILETOSTR("c:\eHealthcare\data\javascript.txt") > sPos =AT('</head>',UPPER(cList))+8 > Thisform.edit1.Value = STUFFC(cList, sPos,0,cAdd) > Thisform.saveBN.Enabled = .T. >ELSE > =MESSAGEBOX("This HTML page is already protected",64,"Confirmation") > Thisform.edit1.Value = cList > Thisform.saveBN.Enabled = .F. >ENDIF >