freelanceprogrammers.org Forum Index » PHP

Error: uncaught exception: Permission denied to call method


View user's profile Post To page top
k_madhana_gopal Posted: Thu Nov 17, 2005 3:53 pm


Joined: 29 Aug 2005

Posts: 2
Error: uncaught exception: Permission denied to call method
/**
* Javascript for AJAX
*
*/

Error: uncaught exception: Permission denied to call method
XMLHttpRequest.open


function AJAXhandler()
{
var ret = null;
try {
ret = new ActiveXObject(`Msxml2.XMLHTTP`);
}
catch (e) {
try {
ret = new ActiveXObject(`Microsoft.XMLHTTP`);
}
catch (ee) {
ret = null;
}
}

if (!ret && typeof XMLHttpRequest != `undefined`)
ret = new XMLHttpRequest();

return ret;
}// EOF AJAXhandler()


// AJAX request is made here for dash_pricing
function AJAX_DASH_process(O, D, W)
{
var ajax = AJAXhandler();
var uri =
"forAjax.php?for=dash&origin="+O+"&destination="+D+"&weight="+W;

ajax.open("GET", uri, true);
ajax.onreadystatechange=function()
{
if (ajax.readyState==4)
{
data = ajax.responseText;
showWeightRate(data);
}
}
ajax.send(null)
}// EOF AJAX_DASH_process()

// AJAX request is made here for priority_zones_settings
function AJAX_PRIORITY_process(O, D)
{
var ajax = AJAXhandler();
var uri = "forAjax.php?for=priority&origin="+O+"&destination="+D;

ajax.open("GET", uri, true);
ajax.onreadystatechange=function()
{
if (ajax.readyState==4)
{
data = ajax.responseText;
showMinimumBulk(data);
}
}
ajax.send(null)
}// EOF AJAX_PRIORITY_process()

function AJAX_CITY_process(S, ID)
{ //alert(S);
//alert(ID);
disableCity(ID);
var ajax = AJAXhandler();
if(ID==`ocity`)
{
var uri =
"http://agriya.com/demo/auctionmall/forAjax.php?for=city&state="+S;}

if(ID==`dcity`)
{
var uri =
"http://agriya.com/demo/auctionmall/forAjax.php?for=state&state="+S;
}

ajax.open("GET", uri, true);
ajax.onreadystatechange=function()
{
if (ajax.readyState==4)
{
if(ajax.status==200){
data = ajax.responseText;
//alert(data.length+"
"+"LLL");

showCity(data, ID);}
}
}
ajax.send(null)
}// EOF AJAX_CITY_process()

function AJAX_SPLPRIORITY_process(O, D)
{
var ajax = AJAXhandler();
var uri = "forAjax.php?for=splp&origin="+O+"&destination="+D;

ajax.open("GET", uri, true);
ajax.onreadystatechange=function()
{
if (ajax.readyState==4)
{
data = ajax.responseText;
showSplMinimumBulk(data);
}
}
ajax.send(null)
}// EOF AJAX_SPLPRIORITY_process()

//-----------------------------------------

// data is fed to dash processing form here
function showWeightRate(data)
{
var Add = document.getElementById(`add`);
var Edit= document.getElementById(`edit`);
var val = data.split(`,`);
if (!val[0])
{
val[0] = `Not Set`;
val[2] = ``;
if (Add.style.display == `none`) {
Add.style.display = `block`;
Edit.style.display = `none`;
}
} else {
if (Edit.style.display == `none`) {
Edit.style.display = `block`;
Add.style.display = `none`;
}
}

document.frmDashPrices.rate.value = val[0];
document.frmDashPrices.id.value = val[2];
if (val[1])
document.frmDashPrices.weight.selectedIndex = val[1]-1;

return;
}// EOF showWeightRate()


// data is fed to dash processing form here
function showMinimumBulk(data)
{
var Add = document.getElementById(`add`);
var Edit= document.getElementById(`edit`);
var val = data.split(`,`);
if (!val[0])
{
val[0] = `Not Set`;
val[1] = `Not Set`;
val[2] = ``;
if (Add.style.display == `none`) {
Add.style.display = `block`;
Edit.style.display = `none`;
}
} else {
if (Edit.style.display == `none`) {
Edit.style.display = `block`;
Add.style.display = `none`;
}
}

document.frmPriorityZoneSettings.minimum.value = val[0];
document.frmPriorityZoneSettings.bulk.value = val[1];
document.frmPriorityZoneSettings.id.value = val[2];

return;
}// EOF showMinimumBulk()


function showCity(data, id) {
if (data.indexOf(`:`)<0) {
alert(`No Cities found for the selected State!!`);
return;
}

var cities = data.split(`:`);
var C = document.getElementById(id);

var vijay="";
for (i=0;i<cities.length;i++)
{
city = cities[i].split(`,`);
vijay += city[1] + "
";
if (city[2] != `undefined` && city[2] != null) {
city[1] += ` / `+city[2];
// city[0] = city[2];

}
C.options[i] = new Option(city[1], city[0]);
}

// C.options[0] = new Option(`select`);
C.selectedIndex = cities.length-1;
C.disabled = 0;
return;
}// EOF showCity()

function disableCity(id) {
var C = document.getElementById(id);
C.options.length = 0;
C.options[0] = new Option(`Loading..`);
C.disabled = 1;
}// EOF disableCity()


// data is fed to spl. priority pricing form here
function showSplMinimumBulk(data)
{
var Add = document.getElementById(`add`);
var Edit= document.getElementById(`edit`);
var val = data.split(`,`);
if (!val[0])
{
val[0] = `Not Set`;
val[1] = `Not Set`;
val[2] = ``;
if (Add.style.display == `none`) {
Add.style.display = `block`;
Edit.style.display = `none`;
}
} else {
if (Edit.style.display == `none`) {
Edit.style.display = `block`;
Add.style.display = `none`;
}
}

document.frmSplPriorityPricing.minimum.value = val[0];
document.frmSplPriorityPricing.bulk.value = val[1];
document.frmSplPriorityPricing.id.value = val[2];

return;
}// EOF showSplMinimumBulk()



This is the AJAXcode which i have designed for the multilevel
drop-down-boxes.Specifically function AJAX_city_process() does this for me..

THis while executed in the localhost cool it is running..

But when i upload it to my server then the Error:""Error: uncaught exception:
Permission denied to call method XMLHttpRequest.open"" is dispalyed..I dunno
the reasons why..Any help ..???



---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.

[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
wenca@... Posted: Thu Nov 17, 2005 4:10 pm


Joined: 18 Nov 2005

Posts: 2
Error: uncaught exception: Permission denied to call method
Well, I think that the problem could be that the script (or the uri to
be opened by JS) must be on the same domain as the page on which the JS
code is running.

Wenca

Madhana Gopal wrote:
> /**
> * Javascript for AJAX
> *
> */
>
> Error: uncaught exception: Permission denied to call method
XMLHttpRequest.open
>
>
> function AJAXhandler()
> {
> var ret = null;
> try {
> ret = new ActiveXObject(`Msxml2.XMLHTTP`);
> }
> catch (e) {
> try {
> ret = new ActiveXObject(`Microsoft.XMLHTTP`);
> }
> catch (ee) {
> ret = null;
> }
> }
>
> if (!ret && typeof XMLHttpRequest != `undefined`)
> ret = new XMLHttpRequest();
>
> return ret;
> }// EOF AJAXhandler()
>
>
> // AJAX request is made here for dash_pricing
> function AJAX_DASH_process(O, D, W)
> {
> var ajax = AJAXhandler();
> var uri =
"forAjax.php?for=dash&origin="+O+"&destination="+D+"&weight="+W;
>
> ajax.open("GET", uri, true);
> ajax.onreadystatechange=function()
> {
> if (ajax.readyState==4)
> {
> data = ajax.responseText;
> showWeightRate(data);
> }
> }
> ajax.send(null)
> }// EOF AJAX_DASH_process()
>
> // AJAX request is made here for priority_zones_settings
> function AJAX_PRIORITY_process(O, D)
> {
> var ajax = AJAXhandler();
> var uri = "forAjax.php?for=priority&origin="+O+"&destination="+D;
>
> ajax.open("GET", uri, true);
> ajax.onreadystatechange=function()
> {
> if (ajax.readyState==4)
> {
> data = ajax.responseText;
> showMinimumBulk(data);
> }
> }
> ajax.send(null)
> }// EOF AJAX_PRIORITY_process()
>
> function AJAX_CITY_process(S, ID)
> { //alert(S);
> //alert(ID);
> disableCity(ID);
> var ajax = AJAXhandler();
> if(ID==`ocity`)
> {
> var uri =
"http://agriya.com/demo/auctionmall/forAjax.php?for=city&state="+S;}
>
> if(ID==`dcity`)
> {
> var uri =
"http://agriya.com/demo/auctionmall/forAjax.php?for=state&state="+S;
> }
>
> ajax.open("GET", uri, true);
> ajax.onreadystatechange=function()
> {
> if (ajax.readyState==4)
> {
> if(ajax.status==200){
> data = ajax.responseText;
> //alert(data.length+"
"+"LLL");
>
> showCity(data, ID);}
> }
> }
> ajax.send(null)
> }// EOF AJAX_CITY_process()
>
> function AJAX_SPLPRIORITY_process(O, D)
> {
> var ajax = AJAXhandler();
> var uri = "forAjax.php?for=splp&origin="+O+"&destination="+D;
>
> ajax.open("GET", uri, true);
> ajax.onreadystatechange=function()
> {
> if (ajax.readyState==4)
> {
> data = ajax.responseText;
> showSplMinimumBulk(data);
> }
> }
> ajax.send(null)
> }// EOF AJAX_SPLPRIORITY_process()
>
> //-----------------------------------------
>
> // data is fed to dash processing form here
> function showWeightRate(data)
> {
> var Add = document.getElementById(`add`);
> var Edit= document.getElementById(`edit`);
> var val = data.split(`,`);
> if (!val[0])
> {
> val[0] = `Not Set`;
> val[2] = ``;
> if (Add.style.display == `none`) {
> Add.style.display = `block`;
> Edit.style.display = `none`;
> }
> } else {
> if (Edit.style.display == `none`) {
> Edit.style.display = `block`;
> Add.style.display = `none`;
> }
> }
>
> document.frmDashPrices.rate.value = val[0];
> document.frmDashPrices.id.value = val[2];
> if (val[1])
> document.frmDashPrices.weight.selectedIndex = val[1]-1;
>
> return;
> }// EOF showWeightRate()
>
>
> // data is fed to dash processing form here
> function showMinimumBulk(data)
> {
> var Add = document.getElementById(`add`);
> var Edit= document.getElementById(`edit`);
> var val = data.split(`,`);
> if (!val[0])
> {
> val[0] = `Not Set`;
> val[1] = `Not Set`;
> val[2] = ``;
> if (Add.style.display == `none`) {
> Add.style.display = `block`;
> Edit.style.display = `none`;
> }
> } else {
> if (Edit.style.display == `none`) {
> Edit.style.display = `block`;
> Add.style.display = `none`;
> }
> }
>
> document.frmPriorityZoneSettings.minimum.value = val[0];
> document.frmPriorityZoneSettings.bulk.value = val[1];
> document.frmPriorityZoneSettings.id.value = val[2];
>
> return;
> }// EOF showMinimumBulk()
>
>
> function showCity(data, id) {
> if (data.indexOf(`:`)<0) {
> alert(`No Cities found for the selected State!!`);
> return;
> }
>
> var cities = data.split(`:`);
> var C = document.getElementById(id);
>
> var vijay="";
> for (i=0;i<cities.length;i++)
> {
> city = cities[i].split(`,`);
> vijay += city[1] + "
";
> if (city[2] != `undefined` && city[2] != null) {
> city[1] += ` / `+city[2];
> // city[0] = city[2];
>
> }
> C.options[i] = new Option(city[1], city[0]);
> }
>
> // C.options[0] = new Option(`select`);
> C.selectedIndex = cities.length-1;
> C.disabled = 0;
> return;
> }// EOF showCity()
>
> function disableCity(id) {
> var C = document.getElementById(id);
> C.options.length = 0;
> C.options[0] = new Option(`Loading..`);
> C.disabled = 1;
> }// EOF disableCity()
>
>
> // data is fed to spl. priority pricing form here
> function showSplMinimumBulk(data)
> {
> var Add = document.getElementById(`add`);
> var Edit= document.getElementById(`edit`);
> var val = data.split(`,`);
> if (!val[0])
> {
> val[0] = `Not Set`;
> val[1] = `Not Set`;
> val[2] = ``;
> if (Add.style.display == `none`) {
> Add.style.display = `block`;
> Edit.style.display = `none`;
> }
> } else {
> if (Edit.style.display == `none`) {
> Edit.style.display = `block`;
> Add.style.display = `none`;
> }
> }
>
> document.frmSplPriorityPricing.minimum.value = val[0];
> document.frmSplPriorityPricing.bulk.value = val[1];
> document.frmSplPriorityPricing.id.value = val[2];
>
> return;
> }// EOF showSplMinimumBulk()
>
>
>
> This is the AJAXcode which i have designed for the multilevel
drop-down-boxes.Specifically function AJAX_city_process() does this for me..
>
> THis while executed in the localhost cool it is running..
>
> But when i upload it to my server then the Error:""Error: uncaught
exception: Permission denied to call method XMLHttpRequest.open"" is
dispalyed..I dunno the reasons why..Any help ..???
>
>
>
> ---------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
>
> [Non-text portions of this message have been removed]
>
>
>
>
> PHP Data object relational mapping generator - http://www.meta-language.net/
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
Reply with quote
Send private message
View user's profile Post To page top
urb@... Posted: Tue Nov 22, 2005 2:14 am


Joined: 12 May 2005

Posts: 12
Error: uncaught exception: Permission denied to call method
I`m trying to debug someone else`s program (Not my favorite activity :-)
I`m getting this error message:

DB Error: syntax error

How can I expend the error to be more specific?

Thanks

Urb
Reply with quote
Send private message
View user's profile Post To page top
tech@... Posted: Tue Nov 22, 2005 5:16 am


Joined: 27 Apr 2005

Posts: 7
Error: uncaught exception: Permission denied to call method
You could write a little function to bypass PEAR which will allow you to get
the full SQL error report, but I think PEAR has a switch in it to do this as
well.
What does the documentation say?

-----Original Message-----
From: php-objects@yahoogroups.com [mailto:php-objects@yahoogroups.com] On
Behalf Of Urb LeJeune
Sent: Monday, November 21, 2005 3:15 PM
To: php-objects@yahoogroups.com
Subject: [php-objects] Pear DB

I`m trying to debug someone else`s program (Not my favorite activity
:-) I`m getting this error message:

DB Error: syntax error

How can I expend the error to be more specific?

Thanks

Urb




------------------------ Yahoo! Groups Sponsor --------------------~--> Get
fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->

PHP Data object relational mapping generator - http://www.meta-language.net/
Yahoo! Groups Links
Reply with quote
Send private message
View user's profile Post To page top
mibblemibble Posted: Tue Nov 22, 2005 10:20 pm


Joined: 22 Nov 2005

Posts: 1
Error: uncaught exception: Permission denied to call method
it would be helpful to know the whole error along with the lines of code 5 prior
and after which it reports back

Urb LeJeune <urb@...> wrote: I`m trying to debug someone else`s
program (Not my favorite activity :-)
I`m getting this error message:

DB Error: syntax error

How can I expend the error to be more specific?

Thanks

Urb




PHP Data object relational mapping generator - http://www.meta-language.net/



SPONSORED LINKS
Php developer Basic programming language Computer programming
languages Programming languages Object oriented programming Object
oriented programming tutorial

---------------------------------
YAHOO! GROUPS LINKS


Visit your group "php-objects" on the web.

To unsubscribe from this group, send an email to:
php-objects-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


---------------------------------






---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.

[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
urb@... Posted: Wed Nov 23, 2005 2:27 am


Joined: 12 May 2005

Posts: 12
Error: uncaught exception: Permission denied to call method
>it would be helpful to know the whole error along with the lines of
>code 5 prior and after which it reports back

DB Error: syntax error

Is the entire error message on screen. I`m not sure where the error
is being producted.
I`m look for a way to get the MySQL error number or error message. Is
there a setting
somewhere in Pear::DB that can be set to product that information?

Urb
Reply with quote
Send private message
View user's profile Post To page top
p_brenner Posted: Wed Nov 23, 2005 7:33 am


Joined: 23 Nov 2005

Posts: 1
Error: uncaught exception: Permission denied to call method
Go here:
http://pear.php.net/manual/en/package.database.db.db-error.php

and read.



-----Original Message-----
From: php-objects@yahoogroups.com [mailto:php-objects@yahoogroups.com] On
Behalf Of Urb LeJeune
Sent: Tuesday, November 22, 2005 3:28 PM
To: php-objects@yahoogroups.com
Subject: Re: [php-objects] Pear DB


>it would be helpful to know the whole error along with the lines of
>code 5 prior and after which it reports back

DB Error: syntax error

Is the entire error message on screen. I`m not sure where the error
is being producted.
I`m look for a way to get the MySQL error number or error message. Is
there a setting
somewhere in Pear::DB that can be set to product that information?

Urb






PHP Data object relational mapping generator - http://www.meta-language.net/

Yahoo! Groups Links
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help