Arno59
Messages postés4600Date d'inscriptionjeudi 23 octobre 2003StatutContributeurDernière intervention18 avril 2023
-
2 mai 2005 à 11:11
Arno59
Messages postés4600Date d'inscriptionjeudi 23 octobre 2003StatutContributeurDernière intervention18 avril 2023
-
5 mars 2007 à 11:10
Je rencontre des problèmes avec Norton SystemWorks 2002
Système d'exploitation : Win 98 SE (léger et rapide)
Linux est plus fiable que Bill
C:\Program Files\Norton SystemWo...\Norton AntiVirus/Navui.dll scan.js voir source ci dessous
Onglet à gauche : Analyse Anti-virus Statut OK => Bug => Erreur de script => Permission refusée
Débogage
Analyse antivirus => Erreur Ligne 80 'null' n'est pas 1 objet
------------------------------------------------------------------
Voici source
// Disable Drag-and-drop support
document.ondragstart = function(){return false;}
// The g_fStartingScan variable is used to disable the launching of new scans
// for a bit after it has been pressed. It's a hack to get around not knowing
// when we are currently executing a scan.
var g_fStartingScan = false;
// Currently selected row, if any.
var g_CurrentRow;
// MessageBox() Flags
var MB_OK = 0x00000000;
var MB_OKCANCEL = 0x00000001;
var MB_ABORTRETRYIGNORE = 0x00000002;
var MB_YESNOCANCEL = 0x00000003;
var MB_YESNO = 0x00000004;
var MB_RETRYCANCEL = 0x00000005;
var MB_ICONHAND = 0x00000010;
var MB_ICONQUESTION = 0x00000020;
var MB_ICONEXCLAMATION = 0x00000030;
var MB_ICONASTERISK = 0x00000040;
var MB_USERICON = 0x00000080;
var MB_ICONWARNING = MB_ICONEXCLAMATION;
var MB_ICONERROR = MB_ICONHAND;
var MB_ICONINFORMATION = MB_ICONASTERISK;
var MB_ICONSTOP = MB_ICONHAND;
var IDOK = 1;
var IDCANCEL = 2;
var IDABORT = 3;
var IDRETRY = 4;
var IDIGNORE = 5;
var IDYES = 6;
var IDNO = 7;
function onNew(){
document.frames("frmScanTasksList").createTask ();
}
function onEdit(){
// We store the tasks by name, but that can change here. So we
// store the row number, which won't change, then rebuild the
// row.
var iTaskIndex = NAVScanTasks.TaskIndex(g_CurrentRow.strScanTask);
NAVScanTasks(g_CurrentRow.strScanTask).Edit();
document.frames("frmScanTasksList").clearRow ( g_CurrentRow );
var strNewName = NAVScanTasks(iTaskIndex).TaskName;
document.frames("frmScanTasksList").makeTask ( strNewName, g_CurrentRow );
}
function onDelete(){
// Prompt users to see if they really want to delete the task
//
iMsgBoxReturn = webWnd.MsgBox(strAreYouSureDeleteTask.innerText, strNortonAntiVirus.innerText, MB_YESNO | MB_ICONINFORMATION);
if (iMsgBoxReturn == IDYES){
document.frames("frmScanTasksList").deleteTask ( g_CurrentRow );
}
}
function onSchedule(){
NAVScanTasks(g_CurrentRow.strScanTask).Schedule(false);
document.frames("frmScanTasksList").clearRow ( g_CurrentRow );
document.frames("frmScanTasksList").makeTask ( g_CurrentRow.strScanTask, g_CurrentRow );
}
// Partie qui bug !!!!!!!!!!!!!!!
function ListFocus () {
var row = document.frames("frmScanTasksList").ScanTasksList.rows.item(0);
row.onclick (); // BUGS ???
//row.cells(1).focus (); // doesn't work anyway
}
function ScanDisableDelay(){
// Let the scan now button be pressed again.
g_fStartingScan = false;
}
function onScan (){
if (!g_fStartingScan) {
// Disable the button for until our timeout happens.
// This prevents people from clicking the button again and
// launching another scan. It's not perfect but it deters
// the customer from pressing it again for a bit.
g_fStartingScan = true;
NAVScanTasks(g_CurrentRow.strScanTask).Scan();
window.setTimeout("ScanDisableDelay()",1000)
}
}
--------------------------------------------------------- Source de Scan_list.js (Navui.dll)
// Disable Drag-and-drop support
document.ondragstart = function(){return false;}
// Globals
var g_TR_ID_Counter = 0;
var g_bSchedulerInstalled = 0;
function OnExit ()
{
//alert ("Exiting");
for (i=0; i < ScanTasksList.rows.length; i++) {
var varTR = ScanTasksList.rows.item (i);
varTR.strScanTask = null;
clearRow ( varTR );
}
//CollectGarbage ();
}
function ShowScanTasks2() {
var i=0;
document.write("<tr>");
document.write("<td>");
document.write("Line " + i++);
document.write("</td>");
document.write("</tr>");
document.write("<tr><td class='dashlinedim'>");
document.write('<img src="spacer.gif" width="1" height="1" border="0" alt="">');
document.write("</td></tr>");
}
function ScanTask()
{
this.TaskName = "Not set";
this.TaskType = 0;
this.Scheduled = 0;
}
function document_onkeydown()
{
//Support for keyup and keydown for navigating the scan list
if (event.keyCode == 38)
{
//Up arrow pressed
var thisRow = null;
for (i=0; i< ScanTasksList.rows.length; i++)
{
if (parent.g_CurrentRow == ScanTasksList.rows(i))
{
thisRow = ScanTasksList.rows(i);
break;
}
}
if (thisRow != null && i > 0 )
{
ScanTasksList.rows(i-2).onclick()
event.cancelBubble = false;
}
}
else if (event.keyCode == 40)
{
//Down arrow pressed
var thisRow = null;
for (i=0; i< ScanTasksList.rows.length; i++)
{
if (parent.g_CurrentRow == ScanTasksList.rows(i))
{
thisRow = ScanTasksList.rows(i);
break;
}
}
if (thisRow != null && i < (ScanTasksList.rows.length-1) )
{
ScanTasksList.rows(i+2).onclick()
event.cancelBubble = false;
}
}
}
//Not all tasks are available when there is no selection.
//Once an item has been selected, this function enables all
//the commands.
function EnableSpecificTaskCommands(strScanTask)
{
if ( parent.NAVScanTasks(strScanTask).CanEdit )
{
parent.TaskCommandsOn.style.display = "block";
parent.TaskCommandsOff.style.display = "none";
}
else
{
parent.TaskCommandsOn.style.display = "none";
parent.TaskCommandsOff.style.display = "block";
}
// Scheduler installed, able to schedule, and no "access denied"
// errors from the scheduler (i.e. someone already has it scheduled)
//
if ( g_bSchedulerInstalled && parent.NAVScanTasks(strScanTask).CanSchedule && parent.NAVScanTasks(strScanTask).Scheduled != -1)
{
parent.ScheduleButtonOn.style.display = "block";
parent.ScheduleButtonOff.style.display = "none";
}
else
{
parent.ScheduleButtonOn.style.display = "none";
parent.ScheduleButtonOff.style.display = "block";
}
};
function findRow(e)
{
if (e.tagName == "TR") {
return e;
}
else if (e.tagName == "BODY") {
return null;
}
else {
return findRow(e.parentElement);
}
}
function TROnFocusInside()
{
//ASZ 5-25-01, IE4.01 does not allow setting varTR.id during
//runtime and does not support innerHTML during load time.
//This means we need to find a new way to locate the row that
//contains our button. Now we are using the DOM to find the
//TR element that contains our button.
e = window.event.srcElement;
r = findRow(e);
if (r != null)
{
r.onclick();
}
}
function ScanDisableDelay()
{
// Let the scan now button be pressed again.
parent.g_fStartingScan = false;
}
function LaunchScanDelay( strScanName )
{
parent.NAVScanTasks(strScanName).Scan();
}
function LaunchScan( strScanName, iDelay )
{
if (!parent.g_fStartingScan)
{
// Disable the button for until our timeout happens.
// This prevents people from clicking the button again and
// launching another scan. It's not perfect but it deters
// the customer from pressing it again for a bit.
parent.g_fStartingScan = true;
if (iDelay)
{
window.setTimeout("LaunchScanDelay(\'" + strScanName+ "\')", iDelay);
}
else
{
parent.NAVScanTasks(strScanName).Scan();
}
window.setTimeout("ScanDisableDelay()",1000)
}
}
// Populate the scan tasks table
function ShowScanTasks(){
g_bSchedulerInstalled = Scheduler.Installed;
//ASZ 5-03-2001
//Create outer loop for sorting the list. This is not very
//efficient but it's fast to code and we're dealing with
//UI code here so simplicity wins over speed.
for (var iSort = 1; iSort <= 9; iSort++)
{
for (var i = 0, varCount = parent.NAVScanTasks.Count; i < varCount; i++)
{
// Does this task match our sort order?
//
if (parent.NAVScanTasks(i).TaskType == iSort)
{
insertTask ( parent.NAVScanTasks(i).TaskName );
} // end of if (varScanTask.TaskType == iSort)
} // end of for (var i = 0, varCount = parent.NAVScanTasks.Count; i < varCount; i++)
} // end of for iSort
} // end of function ShowScanTasks()
function insertTask ( strScanTask )
{
with (document.all.ScanTasksList)
{
// Insert the dotted spacer line if we aren't at the beginning
//
if ( g_TR_ID_Counter > 0 )
{
var varTRSpacer = insertRow();
var varTDSpacer = varTRSpacer.insertCell();
varTDSpacer.colSpan = 5;
varTDSpacer.className = 'dashlinedim';
varTDSpacer.innerHTML = '<img src="spacer.gif" width="1" height="1" border="0" alt="">';
}
// Add a row to the table
//
var varTR = insertRow();
g_TR_ID_Counter = g_TR_ID_Counter + 1;
makeTask ( strScanTask, varTR );
return varTR;
}
}
// Deletes all cell data in a row
//
function clearRow ( varTR )
{
//with (document.all.ScanTasksList)
{
for ( var iCell = 0; varTR.cells.length; iCell++ )
{
varTR.deleteCell();
}
}
}
function deleteTask ( varTR )
{
parent.NAVScanTasks.Delete ( varTR.strScanTask );
document.all.ScanTasksList.deleteRow (varTR.rowIndex-1); // the spacer above
document.all.ScanTasksList.deleteRow (varTR.rowIndex);
// Select the top row now
//
document.all.ScanTasksList.rows(0).onclick ();
}
function onRowClick()
{
EnableSpecificTaskCommands(this.strScanTask);
if (parent.g_CurrentRow)
parent.g_CurrentRow.style.backgroundColor = 'transparent';
this.style.backgroundColor = '#cee3ff';
parent.g_CurrentRow = this;
}
function onRowDblClick()
{
LaunchScan(this.strScanTask, 0);
}
function onScheduleClick()
{
// You *can* delete in the Show of MS Task Scheduler
//
e = window.event.srcElement;
r = findRow(e);
if (r != null)
{
parent.NAVScanTasks(r.strScanTask).Schedule(false);
clearRow ( r );
makeTask ( r.strScanTask, r );
}
}
function makeTask ( strScanTask, varTR )
{
// Yes it does...process it.
//var varName = parent.NAVScanTasks(strScanTask).TaskName;
var varName = strScanTask;
var varScriptName = "empty";
// Escape the backslash double quote (") and single quote (') so it
// appears correctly in a script.
varScriptName = strScanTask.replace(/(["'])/g, '\\$1');
var varListImage;
//
//ASZ 5-03-2001: See ScanTask.h for enum SCANTASKTYPE
//
// Set the image to display on the button
switch(parent.NAVScanTasks(strScanTask).TaskType)
{
case 1:
//Matches with enum SCANTASKTYPE scanComputer (Currently not used)
varListImage = 'comp.gif';
break;
case 2:
//Matches with enum SCANTASKTYPE scanHardDrives (My Computer)
varListImage = 'comp.gif';
break;
case 3:
//Matches with enum SCANTASKTYPE scanRemovable
varListImage = 'remove.gif';
break;
case 4:
//Matches with enum SCANTASKTYPE scanAFloppy
varListImage = 'floppy.gif';
break;
case 5:
//Matches with enum SCANTASKTYPE scanSelectedDrives
varListImage = 'drives.gif';
break;
case 6:
//Matches with enum SCANTASKTYPE scanFolder
varListImage = 'folder.gif';
break;
case 7:
//Matches with enum SCANTASKTYPE scanFiles
varListImage = 'files.gif';
break;
case 8:
//Matches with enum SCANTASKTYPE scanCustom
varListImage = 'virus_loupe.gif';
break;
default:
varListImage = '';
break;
} // end of switch(varScanTask.TaskType)
// I don't like storing the task multiple times. Is
// there a better way?
//
varTR.strScanTask = strScanTask;
// Hilite row when clicked
varTR.onclick = onRowClick;
//Scan the item.
varTR.ondblclick = onRowDblClick;
varTR.title = idtxt_title_scanline.title;
//First column, spacer image
//<td width="9" height="24"><IMG alt="" border=0 height=24 src="spacer.gif" width=9></td>
var varTDSpacerFront = varTR.insertCell();
varTDSpacerFront.width = "9";
varTDSpacerFront.height = "24";
varTDSpacerFront.className = 'clsImage';
varTDSpacerFront.innerHTML = '<IMG alt="" border=0 height=24 src="spacer.gif" width=9>'
// First column - Type/Run button
var varTD1 = varTR.insertCell();
varTD1.width="18";
varTD1.className = 'clsImage';
varTD1.align = 'left';
varTD1.style.vAlign= 'top';
// Show a task run button
//These used to be buttons but now we just have an image.
//I have left the code here just incase we decide to change
//it back to a button.
//varTD1.innerHTML = '<button style="cursor:hand" onFocus="TROnFocusInside()" onClick="parent.NAVScanTasks(\'' + varScriptName + '\').Scan();"><img src="' + varListImage + '"></button>';
varTD1.innerHTML = '<a><img TABINDEX=0 href="#" style="cursor:hand" onFocus="TROnFocusInside()" onClick="LaunchScan(\'' + varScriptName + '\', 250)" src="' + varListImage + '"></a>';
varTD1.title = idtxt_title_scanitem.title;
//Another spacer image
//<td width="13"><IMG alt="" border=0 height=24 src="spacer.gif" width=9></td>
var varTDSpacerMiddle = varTR.insertCell();
varTDSpacerMiddle.width = "13";
varTDSpacerMiddle.className = 'clsImage';
varTDSpacerMiddle.innerHTML = '<IMG alt="" border=0 height=24 src="spacer.gif" width=9>'
// Second column - Description
var varTD2 = varTR.insertCell();
varTD2.className = 'clsText';
varTD2.innerText = varName;
if ( g_bSchedulerInstalled )
{
// Third column - Scheduling Icon
var varTD3 = varTR.insertCell();
varTD3.className = 'clsImage';
varTD3.align = 'center';
varTD3.vAlign= 'center';
var scheduled = parent.NAVScanTasks(varTR.strScanTask).Scheduled;
// Show the scheduling button
if ( parent.NAVScanTasks(varTR.strScanTask).CanSchedule && scheduled != -1 )
{
varTD3.onclick = onScheduleClick;
switch(scheduled)
{
case 1:
varTD3.innerHTML = '<img style="cursor:hand" src="scheduled.gif">'
break;
case 0:
varTD3.innerHTML = '<img style="cursor:hand" src="not_scheduled.gif">'
break;
} // end of switch(varScanTask.Scheduled)
varTD3.title = idtxt_title_scheduleitem.title;
}
}
varName = "";
varScriptName = "";
}
function createTask ()
{
var taskNew = parent.NAVScanTasks.Create ();
if ( taskNew )
{
// Add to the end.
//
var newrow = insertTask ( taskNew.TaskName );
newrow.onclick();
}
}
Arno59
Messages postés4600Date d'inscriptionjeudi 23 octobre 2003StatutContributeurDernière intervention18 avril 2023484 5 mars 2007 à 11:10
Bonjour,
Problème était causé parun mise à jour de Internet Explorer 6.
Il suffisait de coccher demander au lieu de désactiver les scripts => vive la transparence inexistante sous Windows