Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Permission denied to call method XMLHttpRequest.open

Reply
Thread Tools

Permission denied to call method XMLHttpRequest.open

 
 
Une Bévue
Guest
Posts: n/a
 
      10-23-2006
bon he voudrais m'essaye à écrire un widget, qui n'est autre qu'une page
html faisant appel à XMLHttpRequest.

pour l'instant mon Man_wgdt n'est qu'une co^pie du widget RDoc (pour
documentation rubyà mon Man en serait l'équivalent pour le man/*nox,
donc MacOS X.

à part des erreur sur display que m'indique la console javascript :
Error: Error in parsing value for property 'display'. Declaration
dropped.
Source File: http://yvon-thoraval.com/Widgets/Man_wdgt/Man.html
Line: 0

je ne pige pas car j'ai mis les displays dans la feuille css idoine,
passons.

Peut-être un bête pb de cache ???

Mais, le problème rédibitoire et que j'ai droit à :

Error: Error in parsing value for property 'opacity'. Declaration
dropped.
Source File: http://yvon-thoraval.com/Widgets/Man_wdgt/Man.html
Line: 0

qu'est-ce que ça signifie exactement ?

je précise que je fais mes essais da,s mon répertoire ~/Sites donc les
pages sont servies par Apache.

au cas où qq'un aurait un tuyau...

la page en question est là :
<http://yvon-thoraval.com/Widgets/Man_wdgt/Man.html>

je précise aussi que pour XMLHttpRequest je n'ai rien fait de spécial au
niveau des ports, il n'y a pas grand chose d'ouvert à part 80, email
in/out et telnet.
 
Reply With Quote
 
 
 
 
Une Bévue
Guest
Posts: n/a
 
      10-23-2006
Une Bévue <(E-Mail Removed)> wrote:

> on he voudrais m'essaye à écrire un widget, qui n'est autre qu'une page
> html faisant appel à XMLHttpRequest.


<snip french blahblah />

> je précise aussi que pour XMLHttpRequest je n'ai rien fait de spécial au
> niveau des ports, il n'y a pas grand chose d'ouvert à part 80, email
> in/out et telnet.


i do apologize for my mistaken post, here is the english version.

i'm running under MacOS X and want to design a widget being, basically
html+js+images.

then in norder to trys it i put in a directory served by Apache.

to simplify my task of starting with widgets i did a cut'n paste of the
RDoc's one (stands for Ruby doc) mainly because i want to exercice doing
an equivalent of it but ratger for man page.

right on the starting block )))

i face with an error message given by theJavaScript console :

Error: Error in parsing value for property 'opacity'. Declaration
dropped.
Source File: http://yvon-thoraval.com/Widgets/Man_wdgt/Man.html
Line: 0


i should say i do have a firewall on my box and leave it untoucjed for
this first trial because i don't what are the port number ti open, if
any, for XMLHttpRequest, port 80 is open those related to news, mail and
telnet too, i think that's all...


the url of the page :
<http://yvon-thoraval.com/Widgets/Man_wdgt/Man.html>

(nothing really interesting to see right now except the error message,
aznd the images from RDoc)
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      10-23-2006
Une Bévue wrote:

> i face with an error message given by theJavaScript console :
>
> Error: Error in parsing value for property 'opacity'. Declaration
> dropped.
> Source File: http://yvon-thoraval.com/Widgets/Man_wdgt/Man.html
> Line: 0


While that console comes under the name 'JavaScript console' other
components like the CSS parser also emit error messages to that console
so that message above is saying that the CSS parser could not parse the
value set for the CSS opacity property and therefore drops it.





--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
Une Bévue
Guest
Posts: n/a
 
      10-23-2006
Martin Honnen <(E-Mail Removed)> wrote:

>
> While that console comes under the name 'JavaScript console' other
> components like the CSS parser also emit error messages to that console
> so that message above is saying that the CSS parser could not parse the
> value set for the CSS opacity property and therefore drops it.


ah ok opacity do you mean by that display:none ???

because the errors upon css i got iare :
Error: Unknown property '-apple-dashboard-region'. Declaration dropped.
Source File: http://yvon-thoraval.com/Widgets/Man_wdgt/Man.css
Line: 336

this one i can understand...

but the others about "display" :
Error: Error in parsing value for property 'display'. Declaration
dropped.
Source File: http://yvon-thoraval.com/Widgets/Man_wdgt/Man.html
Line: 0

i can't , i think it's related to some jexternal javascript playing with
display:none|block...



yes i've seen effectively other css errors (display on my computer then
you mean those css errors stops javascript XmlHttpRequest ?

or are those independant, as i believe )))
 
Reply With Quote
 
VK
Guest
Posts: n/a
 
      10-23-2006
Une Bévue wrote:
> because the errors upon css i got iare :
> Error: Unknown property '-apple-dashboard-region'. Declaration dropped.
> Source File: http://yvon-thoraval.com/Widgets/Man_wdgt/Man.css
> Line: 336


On your page you are using wrong syntax for JavaScript tag:
<script type='text/javascript' src='Man.js' charset='utf-8'/>

You cannot use this syntax except some very particular hacks which are
not presented in your case. It knocks down the parser and it leads to
the avalanche of error messages you see (which are meaningless in this
case, it simply means "parser lost the idea of how to build DOM tree
for the given page". IE just renders blank page in cases like yours.)

Use the right syntax:

<script type='text/javascript' src='Man.js' charset='utf-8'></script>

 
Reply With Quote
 
Une Bévue
Guest
Posts: n/a
 
      10-23-2006
VK <(E-Mail Removed)> wrote:

> On your page you are using wrong syntax for JavaScript tag:
> <script type='text/javascript' src='Man.js' charset='utf-8'/>


i think that's the syntax when running under dashbord not apache...

> You cannot use this syntax except some very particular hacks which are
> not presented in your case. It knocks down the parser and it leads to
> the avalanche of error messages you see (which are meaningless in this
> case, it simply means "parser lost the idea of how to build DOM tree
> for the given page". IE just renders blank page in cases like yours.)
>
> Use the right syntax:
>
> <script type='text/javascript' src='Man.js' charset='utf-8'></script>


i didn't get the denied access for XmlHttpRequest right now, but i have
to insvestigate de code, js complains about not having :

Error: createGenericButton is not defined
Source File: http://yvon-thoraval.com/Widgets/Man_wdgt/Man.js
Line: 49

and alos, (may it's linked to the preceeding one) :

Error: document.getElementById(currentPane) has no properties
Source File: http://yvon-thoraval.com/Widgets/Man_wdgt/Man.js
Line: 363

i've to check that

thanks for your time and your reply.
 
Reply With Quote
 
VK
Guest
Posts: n/a
 
      10-23-2006
> > On your page you are using wrong syntax for JavaScript tag:
> > <script type='text/javascript' src='Man.js' charset='utf-8'/>

>
> i think that's the syntax when running under dashbord not apache..


It is not important under what is it running - it is not acceptable as
long as the resulting page is intended to be viewed by a browser. The
only way to override <script> tag syntax is by using well-formed XHTML
page served with Content-Type application/xhtml+xml (but in this case
you're xing IE out). So the generic correct answer is: this syntax is
wrong.

> i didn't get the denied access for XmlHttpRequest right now, but i have
> to insvestigate de code, js complains about not having :
>
> Error: createGenericButton is not defined
> Source File: http://yvon-thoraval.com/Widgets/Man_wdgt/Man.js
> Line: 49


....
<script type='text/javascript' src='enericButton.js' charset='utf-8'>
....
"enericButton" ?

 
Reply With Quote
 
Une Bévue
Guest
Posts: n/a
 
      10-24-2006
VK <(E-Mail Removed)> wrote:

> "enericButton" ?


ah ! bull@&it !!!

ok no more suntax errors just the :
Erreur : Warning: unrecognized command line flag -psn_0_3827171330

source file :
file:///Applications/Firefox_2_fr/Firefox_2_fr.app/Contents/MacOS/compon
ents/nsBrowserContentHandler.js
Ligne : 576

mac os w complains about the psn arg this
"components/nsBrowserContentHandler.js"

isn't part of my cut'n paste )))

now i face right to the pemission denied for "Erreur : uncaught
exception: Permission callind method XMLHttpRequest.open"

may be this is becaise this widget (my copy of RDoc) asks for online
pages (the Ruby doc's one) and i have something to change in my Apache
setup in order to allow xml application ?
 
Reply With Quote
 
VK
Guest
Posts: n/a
 
      10-24-2006
> now i face right to the pemission denied for "Erreur : uncaught
> exception: Permission callind method XMLHttpRequest.open"


Mais oui, naturellement

In the default security environment XMLHttpRequest is not allowed to
communicate with other domains. JSONet can send/retrieve text data
cross-domain but this feed format is not supported yet by Ruby.

So to keep XMLHttpRequest approach you have to use one of regular
server-side fixes for the cross-domain block annoyance. Either use
mod_rewrite or a content grabber (sometimes also euphemistically called
"server mediator").

I'm not so strong in XUL component security policies. If it gives more
privileges than on a regular web-page, you may wrap your call into
try-catch block:

try {
req.open("GET", currentDocURL, true);
}
catch(SecurityException) {
// that is default security environment
// you are not allowed to make cross-domain calls
// think of an alternative
}

 
Reply With Quote
 
Une Bévue
Guest
Posts: n/a
 
      10-24-2006
VK <(E-Mail Removed)> wrote:

>
> Mais oui, naturellement
>
> In the default security environment XMLHttpRequest is not allowed to
> communicate with other domains. JSONet can send/retrieve text data
> cross-domain but this feed format is not supported yet by Ruby.


no ruby code at all in rdoc widget i'm experiencing with.
>
> So to keep XMLHttpRequest approach you have to use one of regular
> server-side fixes for the cross-domain block annoyance. Either use
> mod_rewrite or a content grabber (sometimes also euphemistically called
> "server mediator").
>
> I'm not so strong in XUL component security policies. If it gives more
> privileges than on a regular web-page, you may wrap your call into
> try-catch block:
>
> try {
> req.open("GET", currentDocURL, true);
> }
> catch(SecurityException) {
> // that is default security environment
> // you are not allowed to make cross-domain calls
> // think of an alternative
> }


ok, i understand, then you think Dashboard has some special feature to
allow X-domin calls ?
(the widget i'm trying under apache is used to run under dashboard env.)

because their are a lot of widgets like that able to load outside info
(images, radio stream, weather...)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Permission denied to call method XMLHttpRequest.open" error bleen Javascript 0 08-01-2007 02:00 PM
Problem with UniversalBrowserRead: "Permission denied to call method XMLHttpRequest.open" Charlie Javascript 1 03-18-2007 02:42 AM
Permission denied to call method XMLHttpRequest.open vikas.khengare@gmail.com Javascript 0 02-17-2006 12:11 PM
Permission denied to call method XMLHttpRequest.open francescomoi@usa.com Javascript 5 07-30-2005 06:35 PM
"Permission denied" error while calling WSH's LogEvent method Yitzhak ASP General 2 01-21-2004 11:15 PM



Advertisments