hasan's blog (বল্গ)

work for fun!!!

uncaught exception: Permission denied to get property Object.constructor

with 2 comments

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,

Written by nhm tanveer hossain khan

December 30, 2007 at 1:58 pm

Posted in javascript, tips

2 Responses

Subscribe to comments with RSS.

  1. 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!

    Redstar

    January 1, 2008 at 7:11 pm

  2. 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 ;)

    arild

    January 5, 2008 at 4:01 pm


Leave a Reply