I've tried to show a image in my .js file in win11, but the ''document' is undefined' problem occurs.

Proshanto Brahmmachary 0 Reputation points
2024-05-17T09:48:08.2933333+00:00

Script: Documents\AuthRule.js

Line: 20

Char: 1

Error: 'document is undefined'

Code: 800A1391

Source: Microsoft JScript runtime error.

I've tried to make a javascript that shows a picture and creates some function, one of them being created when a onclicked item is being pressed. I've tried to fixed it by editing the code, but it does not work. My computer is Windows 11 64-bit running in HP Compaq dc 5800. it has 6GB RAM and 3GH Intel(R) Duo Core processor.

Here is an picture of the jscript.

var JavascriptPath = "C:\Users\Prosh\Document\AuthRule.js"

function setsettings(SystemString) {

/// <param name="Win" type="SwitchParameter" mayBeNull="true">

/// Specifies that the settings must be in windows OS Configuration.

/// </param>

/// <param name="Linux" type="SwitchParameter">

/// Specifies that the settings must be in Linux OS Configuration.

/// </param>

/// <param name="Unix" type="SwitchParameter">

/// Specifies that the settings must be in UNIX OS Configuration

/// </param>

/// <param name="SetCon" type="Hastable" mayBeNull="false">

/// Specifies the settings configuration. Can be in file or in a variable or can be given here.

/// </param>

var tempset = "SetCon"

if (Settings != null) {var settings = "5-6"}

if (Settings !== TempSet) {var settings = "TempSet"}

}

document. createElement('img')

Onclicked(SetSetting) ;{

function GetSettingHV(SystemString) {

/// <param name="Include" type="SwitchParameter">

/// Specifies that the settings must incude the value.

/// </param>

/// <param name="Exclude" type="SwitchParameter">

/// Specifies that the settings must exlude the value.

/// </param>

SetCon

TempSet

Settings

} }

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
907 questions
0 comments No comments
{count} votes