using jQuery not working

9 views
Skip to first unread message

Markandeya

unread,
May 30, 2013, 3:22:27 AM5/30/13
to unho...@googlegroups.com
Dear Friends of Unhosted Web Apps,
I am remaking a web app into an unhosted web app. I call jQuery with <script src="Scripts/jquery-1.8.3.js" type="text/javascript"></script>. Other external  .js files are recognized at this address and their functions run. But my $(document).ready(function () {    lines don't work. So no jQuery functions work.
  Any Ideas or suggestions? Thanks much , Markandeya

Michiel B. de Jong

unread,
May 30, 2013, 5:03:26 AM5/30/13
to unho...@googlegroups.com
- try "alert($);", to rule out any other problems with the lines in
your document.ready function.
- have you ever used your browser's console? it's a good thing to
learn, invaluable for debugging. It's Ctrl-Shift-K in FF, and iirc it's
Ctr-Shift-I in Chrome (but use Cmd instead of Ctrl on a Mac). there, you
can execute arbitrary javascript in the 'console' tab, and you can also
see if the script include resulted in a "200 ok" or a "404 not found",
in the net/network tab. and instead of having to do alert($); you can
just type $ into the console, and it will evaluate to either probably a
function if it exists, or undefined if it doesn't.
- you're including from Scripts/ with a capital 'S', maybe the
foldername is lowercase on your server? most webservers are
case-sensitive in the way they map URLs to filesystem paths.

other than that, if none of that works, then please publish your
(broken) code, for instance on github, so that it's easier for other
people to take a look at it. you can also come to our chatroom so we can
chat about it, it's #unhosted on freenode (you can use
http://webchat.freenode.net/ or http://irccloud.com/ if you don't have
an irc chat client installed on your computer)

HTH, good luck!


Cheers,
Michiel

Markandeya

unread,
May 30, 2013, 7:41:14 AM5/30/13
to unho...@googlegroups.com, anyt...@michielbdejong.com

Dear Michiel,
Wow, Thanks for the quick reply and as soon as i opened the browser console in FF as you explained i found all the problems listed and easily fixed.
I never knew about the console and it is a great tool. I am very excited to be making my first unhosted web app where people can run it on mobile devices without an internet connection.
Thanks for the support and whole project. Markandeya

pir...@gmail.com

unread,
May 30, 2013, 7:48:24 AM5/30/13
to unho...@googlegroups.com, anyt...@michielbdejong.com

Unhosted app running on mobile phones? How are you doing that?

--
 
---
You received this message because you are subscribed to the Google Groups "Unhosted Web Apps" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unhosted+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Markandeya

unread,
May 30, 2013, 8:39:58 AM5/30/13
to unho...@googlegroups.com
Dear  Jesus,
Sorry, i meant that any smart phone or mobile device that can run a web browser could run an unhosted web app if the folder for the web app is copied into the mobile device and a correct address is entered in the browser. This is my understanding but i haven't installed one yet, soon though. Maybe others can give a truer, more experienced answer. All the best, Markandeya


Sebastian Kippe

unread,
May 30, 2013, 9:09:03 AM5/30/13
to unho...@googlegroups.com
Hi,

What works best is using AppCache for making the assets locally available. If you e.g. add an app to your home screen on iOS, that's when the manifest lookup and download of your assets will happen, so that it's available offline when you open the app from the home screen.

Aside from packaged and hosted apps on FirefoxOS, you can also install Open Web Apps on Android via Firefox for Android.

Then there are Ubuntu Web Apps, which will be a 1st-class citizen next to native apps on Ubuntu Phone (and desktop), Pinned Sites for Windows 8 and Phone, Tizen apps which are just W3C Widgets, and so on.

It's a bit messy, which is why we our company joined W3C just this week in order to help standardize app installation and management a bit more [1]. I hate putting marketing on this list, but if you don't want to mess around with all this stuff, you can host your apps on 5apps Deploy [2], and we'll generate all the various configs, icons, manifests, etc. automatically for you on every deploy. If you publish your app with an open-source license, hosting and deployment is for free, similar to public repos on GitHub.

Cheers
Sebastian


On May 30, 2013, at 2:39 PM, Markandeya <mrc5...@gmail.com> wrote:

Dear  Jesus,
Sorry, i meant that any smart phone or mobile device that can run a web browser could run an unhosted web app if the folder for the web app is copied into the mobile device and a correct address is entered in the browser. This is my understanding but i haven't installed one yet, soon though. Maybe others can give a truer, more experienced answer. All the best, Markandeya



pir...@gmail.com

unread,
May 30, 2013, 9:35:25 AM5/30/13
to unho...@googlegroups.com

OffTopic: congratulation for joining W3C! :-)

Reply all
Reply to author
Forward
0 new messages