1

I want to write a local mobile application using jquery mobile without a server. i want to split the views into separated html/template file. so i need to load them during running, I use the following way like :

$.get('views/somepage.tmpl')

on Firefox, it works, but on chrome, there is a cross-domain problem, the error information is:

Origin null is not allowed by Access-Control-Allow-Origin.

so what i want to ask is that: any solution for it, i don't want to write all Htmls into one file.

thanks in advances

Sandip Armal Patil
  • 6,241
  • 21
  • 93
  • 160
  • 1
    Take a look [here](http://stackoverflow.com/a/6075747/474535) for more info and a possible (insecure) solution – bart s Dec 10 '12 at 06:51

1 Answers1

0

Despite of some standards, there are some differences between web browsers. Try to change your file's path to full directory. For example:

"D:/index.html"

And if this won't work try to add "file:///". For example (I think, this one won't work with firefox;) ):

file:///D:/index.html
Piotr Krysiak
  • 2,815
  • 3
  • 23
  • 35