Friday, 15 August 2014

Javascript "Object Required" Error -



Javascript "Object Required" Error -

i'm working @ organization uses ie 8 (windows 7). every user gets policy includes predefined set of settings. have problem javascript code occurring on 2 machines (these 2 machines same department). line of code is:

if (mgr[k] == systemuser().substr(1, systemuser.length))

the error "object required". i've written code display message of each value , found error regarding function systemuser().

i need thought might cause error show on 2 machines. there definition in net options block function? need install supported?

i'm inserting systemuser() code

function systemuser(){ wshshell = new activexobject("wscript.network"); homecoming wshshell.username; }

thanks comments, realized problem in accessing function systemuser(). function written in external js file. both users, using these machines, did not have permissions read js file.

granting them read permission external script solved problem.

javascript

No comments:

Post a Comment