Permission denied to call method XMLHttpRequest.open

U

Une Bévue

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.
 
U

Une Bévue

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

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)
 
M

Martin Honnen

Une said:
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.
 
U

Une Bévue

Martin Honnen said:
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 )))
 
V

VK

Une said:
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>
 
U

Une Bévue

VK said:
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.
 
V

VK

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" ? ;-)
 
U

Une Bévue

VK said:
"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 ?
 
V

VK

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
}
 
U

Une Bévue

VK said:
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...)
 
V

VK

try {
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.)

Oh, so this is that: <http://www.apple.com/macosx/features/dashboard/>
? (for some reason I mistook your code for a Gecko XUL module
development).

I have no idea, sorry, what Dashboard is about and how is it
implemented. If it's something like Opera 9.x widgets
<http://widgets.opera.com/> then you have to *install* the widget first
(on prompt) and only then widget gets some extended privileges.

The problem is that you are testing your code on a regular HTML page
with default security restrictions and you are getting security
exceptions relevant to this environment. But at the same time you are
asking how to change the code so it would work in some all another
environment. That is a bit too abstract ;-)
You should install your widget on Mac first and then look what is
working and how. In any case I can assure you right away that widgets
(neither Macy ones nor Opera ones) do not get any extra privileges if
just served from a server right to client's browser.
 
U

Une Bévue

VK said:
Oh, so this is that: <http://www.apple.com/macosx/features/dashboard/>
? (for some reason I mistook your code for a Gecko XUL module
development).

I have no idea, sorry, what Dashboard is about and how is it
implemented. If it's something like Opera 9.x widgets
<http://widgets.opera.com/> then you have to *install* the widget first
(on prompt) and only then widget gets some extended privileges.

The problem is that you are testing your code on a regular HTML page
with default security restrictions and you are getting security
exceptions relevant to this environment. But at the same time you are
asking how to change the code so it would work in some all another
environment. That is a bit too abstract ;-)
You should install your widget on Mac first and then look what is
working and how. In any case I can assure you right away that widgets
(neither Macy ones nor Opera ones) do not get any extra privileges if
just served from a server right to client's browser.

yes then dashbord has some special features , yes this king of widgets
does exist on othe oses under kde i think. Also opera ones looks the
same as apple one.

in the mean time i've discovered a special app to develop widgets ))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top