Discussion Forums  >  WebViews and HTML for Mobile

Replies: 7    Views: 198

Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
11/06/13 12:07 PM (10 years ago)

html , javascript ....android

hello i tried some javascript+html image galleries. when i ran the image gallery directly through the website it ran fine.. http://coolcarousels.frebsite.nl/c/59/ the above link ran fine on my tablet with image gallery working perfectly. then on my pc i downloaded their zip file.extracted the files to a folder. i tried the html file on my pc .it works perfect. then i put the whole folder in my tablet. now the html file opens with image but javascript dosent work.so the images are stuck.the previous and the next button dosent work. any1 has any insight?? also i wanted to ask does chris1 s html pro plug in support javascript pages? thanks akshay
 
JimmySaver
Aspiring developer
Profile
Posts: 187
Reg: Apr 09, 2012
location unknow...
5,870
like
11/07/13 12:20 AM (10 years ago)
Hi Akshay, I had very similar issues just a few weeks ago (though my issue was to do with sounds playing, or rather not playing!). There is some good assistance from SmugWimp in several threads but (and this come from a good amount of time on Stackoverflow, too) Android and Javascript do not work as well together as they do on iOS. My project is running 2.2 and the older BT version on self hosted. In the end, the solution came from making the Javascript world visible. To be honest, I don't fully understand the solution but I do know that I had to tinker in the Javascript itself to get it to work. All of the above is assuming the file paths are correct?
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
11/07/13 12:44 AM (10 years ago)
thanks Jimmy.. i will search the forums.. but one thing is - the java script works perfectly well when ran from website but the same java script dosent work when i manually put the code in my tablet. (i never put the code in my application ,i just copied the folder from desktop to tablet) i have a folder on my pc .In that folder >> a. 1 html file b. 1 javascript file c. 1 folder named images (contaiing images) can you just tell me where does item a b c go in eclipse project regarding making javascript to work lots of trial and error ahead i guess>>
 
JimmySaver
Aspiring developer
Profile
Posts: 187
Reg: Apr 09, 2012
location unknow...
5,870
like
11/07/13 01:00 AM (10 years ago)
Yeah, quite a bit of trial and error if my experience is anything to go by (but isn't that half the fun?!). I think I misunderstood, I didn't realise that the "raw" code wasn't working on the tablet (I thought you were running your app as an .apk on your tablet). This is interesting. Do you have access to your own server at all? I have a VPS and I often find it useful to upload all of my files to the server and access them on multiple devices for testing before adding them to an app. This also helps me with the file / directory structure. In answer to your question, my html file, my javascript file and my images all sit in the BTDocs folder of assets. The images aren't in a folder, they're all at the same directory level. I find this makes for a messier project but does allow me to edit the html file with ease. So my example.html file references the .js file as simply "example.js" in the header (which saves adding anything in the way of file paths which can be easily entered incorrectly, especially with hundreds of html files!). Similarly, in my example.html file, all my images are referenced as "image.png", again without the file path. Touch wood, this seems to be working so far. I'd be happy to look at the eclipse project my end if you wanted so dropbox it over but, I warn you, there are much smarter people on the forums here and I might not be much use!
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
11/07/13 05:01 AM (10 years ago)
hey!! i dont have any servers..i just use bt control panel as of now.. in few hours i will try to put the code in apk file and see what happens.(in office now) i will also put everything in bt docs folder as you did..(fingers crossed) i will surely dropbox it if needed ..thanks for reaching out i intend to use the above carousel as a menu with chris1s html pro cheers
 
JimmySaver
Aspiring developer
Profile
Posts: 187
Reg: Apr 09, 2012
location unknow...
5,870
like
11/07/13 11:30 AM (10 years ago)
Good luck then! Let us know how you get on!
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
11/07/13 11:32 AM (10 years ago)
haha..just tried and failed miserably
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
11/07/13 11:37 AM (10 years ago)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.