Loading... Cancel

uncaught exception: Permission denied to get property Object.constructor R

December 30th, 2007

seems you are getting “uncaught exception: Permission denied to get property Object.constructor” while you are  executing some javascript which was instantiating some objects and during that time it stucked with some exception.

for example

function get(pUpdate, pUrl, pParams) {
new Ajax.Updater(pUpdate, pUrl, {parameters: pParams});
}

if you want to regenerate this exception you can invoke this function with the following arguments -

get(”abc”, “http://abc”)

so why this crap ?

the main reason is in your code where you mentioned about “parameters” and which is not supposed to be null. you better write the following code -

function get(pUpdate, pUrl, pParams) {
var options = new Array();
if (pParams != null) {
options[”parameters”] = pParams;
}

new Ajax.Updater(pUpdate, pUrl, options);
}
that will take away your javascript exception.

best wishes,

Total 2 responses found

Close
  •   arild

    Thu Jan 70 06:33

    your blog is now so techy that i couldt find a suitable place to leave you a nice comment... your code sharing on blog must be so interesting and useful for the community, sorry i cannot contribute. perhaps 2008 can be the year for somewhere in... open source? if you write useful things for mac users, perhaps i can pick up a few things ;)

  •   Redstar

    Thu Jan 70 06:33

    Happy New Year Hasan, and sorry I forgot your Birthday...
    I wish you a good health, a lot of wisdom, and love for this new year!