Discussion Forums  >  Uncategorized

Replies: 4    Views: 456

nremtp
Lost but trying
Profile
Posts: 2
Reg: Jan 28, 2011
Maine
20
02/13/11 03:37 PM (15 years ago)

Using external CSS and JS Files with Custom HTML

Hi. When using custom HTML, how do you upload the external CSS and JS files? I can upload the actual HTML file without a problem. I really don't want to convert everything to inline, since I really don't know how to do that. Thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/13/11 11:08 PM (15 years ago)
There is not a method to 'upload' CSS or Javascript files. Mobile pages are typically small and light and oftentimes include the CSS and Javascript inline. Howver, depending on what you're trying to do there are a zillion options. What type of screen are you working with? CustomHTML? CustomURL?
 
nremtp
Lost but trying
Profile
Posts: 2
Reg: Jan 28, 2011
Maine
20
like
02/14/11 10:28 AM (15 years ago)
Thank you for the reply. I'm using the customHTML screen for a calculator-type app. It was originally an excel file that I had converted to HTML.
 
Fazlul
Aspiring developer
Profile
Posts: 18
Reg: Jun 15, 2011
location unknow...
180
like
06/22/11 03:58 PM (14 years ago)
Hi David, can you suggest one way to use external .js files ? I created a small animation using another program and i need to use that in my Custom HTML. Trying embedding it but its too big and messes up my html. Thanks, Faz
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/23/11 03:09 AM (14 years ago)
A calculator sounds like a good candidate for embedding the content in the Xcode project and not pasting the HTML in the control panel. a) Make the HTML doc and the Javascript doc as normal in whatever editor you want b) Drag them over the BT_Docs folder in Xcode to add them to the project c) Add a Custom HTML screen in your control panel and connect to a button or menu IMPORTANT: Be fure to see the notes in the BT_Docs > sample.js file about getting Xcode to allow your javascript to run in your html. A little tweek needs to be made to your build settings to run external javascript files that you reference from HTML files inside the project. Not a big deal, see the notes on sample.js
 

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.