Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 6    Views: 96

Moestress
Android Fan
Profile
Posts: 91
Reg: Feb 12, 2012
Lynwood
4,110
01/03/14 10:45 AM (10 years ago)

Custom HTML/ Text and Javascript issue

I am having a design issue with the html/text plugin when I add a custom java script array. In the app, the screen widens and one part of the script is on one side of the page, then I scroll and there other parts of the script is on the other side. Better example. I have randomized quotes in an array. Quotes are on top and a randomizer link/button directly under the array list. It appears as if the screen is being expanded or widened and the quotes arrays are on the far right and the randomizer link/button on the far left. <> indicates button/link Would like it to appear like this "Love is Great" <Randomize> Versus <Randomize> "Love is great" Place anywhere else that accepts html it looks perfect. Not sure what my down fall is... Any help would be great! Almost there!! Year !2014 LOOKS SOOOO Appy!! lol
 
Moestress
Android Fan
Profile
Posts: 91
Reg: Feb 12, 2012
Lynwood
4,110
like
01/03/14 10:52 AM (10 years ago)
Oh, I did manage to use the custom url screen, but I want my users to be able to access these quotes offline as well.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/03/14 11:16 AM (10 years ago)
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
01/03/14 11:39 AM (10 years ago)
You could use Html Doc and save it inside of Eclipse and it will work offline. The format problem did you have this in the header/meta? <meta content="width=device-width; initial-scale=1.0; maximum-scale=2.0; user-scalable=1;" name="viewport" /> <style type="text/css"> It should scale it down correctly
 
Moestress
Android Fan
Profile
Posts: 91
Reg: Feb 12, 2012
Lynwood
4,110
like
01/03/14 11:41 AM (10 years ago)
Okay, so this might not be my exact issue, but after re-reading the HTML5 standard instructions this is what I found... "Javascript: If the HTML document uses javascript, for best results, include it in the HTML <head> section. You can also use external javascript files but many app owners struggle with this. There are some gotcha's about how iOS and Android handle these files so you may end up doing some hacking to get external .js files to work as expected. " With this being noted, do I then create a <head> section and then add my javascript, or is there a <head> section somewhere else where I should add the file? My app is intended to be very basic at this time. Simply need the array to be clickable and randomize in the actual bt hosted screen. It looks great going to the remote hosted website, but I would rather the app be a full app and not link to the site.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
01/03/14 11:59 AM (10 years ago)
If the js isn't heavy you can add it to html file header. If its heavy and large you can added it to the BT_Docs folder along with the HTML file. And reference your css and js as such: <link href='yoursss.css' rel='stylesheet' /> <script src='your.js'></script> File Structure in BT_Docs BT_Docs/yourhtml.html BT_Docs/yourcss.css BT_Docs/your.js It should work fine
 
Moestress
Android Fan
Profile
Posts: 91
Reg: Feb 12, 2012
Lynwood
4,110
like
01/03/14 12:13 PM (10 years ago)
Okay, was just reading up on this elsewhere. Basic Javascript instructions. I should save the files in notepad and upload it to my site, then link it. I will do this and see how this works. Thank you so much.. Oh and no I didnt add that additional information. Will rework, and yes its really simple. Each Array has approximately 30-40 quotes per screen. Cant wait to get the html5 so I can connect to each screen vs going back. @Mysps... omg so excited. Nearly done... looks fantastic on my HTCone... Cannot wait!
 

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.