AJAX possible BUG

Bugs will be moved here once resolved.

Post » Fri Feb 08, 2013 10:27 pm

so here its whats happens when i try to use the GET request method from AJAX.



and the test

http://mattepainting.be/test/index.html

more infos about my tests

http://www.scirra.com/forum/topic62902_post387592.html#387592

nothing workimothep852013-02-08 22:29:20
B
32
S
9
G
6
Posts: 1,469
Reputation: 7,955

Post » Fri Feb 08, 2013 10:45 pm

https://www.scirra.com/manual/107/ajax

Access-Control-Allow-Origin: *

also, you are loading a non existant file, why would you expect it to work? :Dranma2013-02-08 22:46:38
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Fri Feb 08, 2013 10:48 pm

a non existing file???
this is the text i want to load in the textbox http://mattepainting.be/index.txt

and where and how i have to put/use this:   Access-Control-Allow-Origin: *imothep852013-02-08 22:53:58
B
32
S
9
G
6
Posts: 1,469
Reputation: 7,955

Post » Fri Feb 08, 2013 11:43 pm

OK thanks its solved, the problem was, i used the "www" :D
B
32
S
9
G
6
Posts: 1,469
Reputation: 7,955

Post » Fri Feb 08, 2013 11:45 pm

@ranma You should think more before posting your comments, because they tend to be inaccurate lately, and not that constructive...

@imothep85 Apparently the "www" subdomain is important here for the AJAX call
Try whether to access your page from http://www.mattepainting.be/test/index.html
Or remove the "www" to the text file in your code

Maybe there's a universal solution to make both work at the same time though

EDIT: ah one minute late, you found first ^^lemo2013-02-09 01:28:09
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Fri Feb 08, 2013 11:45 pm

If you are testing on localhost:50000 AJAX won't work.

If your HTML5 is hosted on mattepainting.be, no need to use cross domain control.


If your HTML5 is not hosted on mattepainting.be, you should make a .xml file in mattepainting.be directory to give acceptable permissions to other domains.


https://support.ookla.com/entries/21097566-What-is-crossdomain-xml-and-why-do-I-need-it-

B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Sat Feb 09, 2013 12:15 am

yeep that what i said its working, the problem was just the "www" not working with ajax. [<:o)] imothep852013-02-09 00:17:12
B
32
S
9
G
6
Posts: 1,469
Reputation: 7,955

Post » Sat Feb 09, 2013 12:29 am

The www works with Ajax...as long as your initiating url also has the www prefix. They have to match, otherwise it falls to your Access Origin rules.theubie2013-02-09 00:29:27
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Sat Feb 09, 2013 10:24 am

[QUOTE=lemo] @ranma You should think more before posting your comments, because they tend to be inaccurate lately, and not that constructive...[/QUOTE] oh cmon, that one was just a one time tired like hell misunderstanding :D why the one in this thread is inaccurate and not constructive? it is as constructive an accurate as it can be under the circumstances :Dranma2013-02-09 10:24:17
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sat Feb 09, 2013 10:53 am

Closed as not a bug, you must configure your servers properly if you wish to make cross-domain requests.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest