Bootstrap not working when opening via the file., Coded with Netbeans but I can't open it via the file without Boots |
Bootstrap not working when opening via the file., Coded with Netbeans but I can't open it via the file without Boots |
Biggles |
Jun 16 2014, 02:51 AM
Post
#1
|
Group: Members Posts: 7 Joined: 16-June 14 Member No.: 21,095 |
My dad showed me Netbeans so I coded quite a bit but when I open the text file with a web browser it is just plain without the Bootstrap Javascript. Please help!
This post has been edited by Biggles: Jun 16 2014, 02:52 AM |
pandy |
Jun 16 2014, 03:01 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
What did you name the file? Somthing.txt? You must use the .html extension if it is an HTML file. If it's some other type of file you need to tell me what it is. I don't know Netbeans.
|
Biggles |
Jun 16 2014, 05:07 AM
Post
#3
|
Group: Members Posts: 7 Joined: 16-June 14 Member No.: 21,095 |
What did you name the file? Somthing.txt? You must use the .html extension if it is an HTML file. If it's some other type of file you need to tell me what it is. I don't know Netbeans. I am trying to open it via the files rather then through Netbeans (a program that you can code HTML, JSON files, CSS, JavaScripts and what not). Bootstrap works when I run it using Netbeans but when I go to the .txt files to open with a browser it loads but the Jumbotron and panels I coded into it doesn't work. Also sorry for the bad grammar I'm only 10. Thanks for the quick reply. This post has been edited by Biggles: Jun 16 2014, 05:07 AM |
pandy |
Jun 16 2014, 05:15 AM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
That's what happens when you open a local text file in a browser.
Does the file contain HTML and JavaSript? Only JavaScript? If the latter, you can't run JavaScript directly in a browser by just loading the JS file. It needs to be either embedded in a HTML file or linked from a HTML file. If the former, it contains HTML, try renamning it with a .html extension and see how that goes. Know what, can you upload a sample file here or paste its content in your post so we can see what it is? Your grammar is fine. Probably better than mine. I'm not even a native English speaker, so who am I go judge that? |
Biggles |
Jun 16 2014, 07:07 AM
Post
#5
|
Group: Members Posts: 7 Joined: 16-June 14 Member No.: 21,095 |
That's what happens when you open a local text file in a browser. Does the file contain HTML and JavaSript? Only JavaScript? If the latter, you can't run JavaScript directly in a browser by just loading the JS file. It needs to be either embedded in a HTML file or linked from a HTML file. If the former, it contains HTML, try renamning it with a .html extension and see how that goes. Know what, can you upload a sample file here or paste its content in your post so we can see what it is? Your grammar is fine. Probably better than mine. I'm not even a native English speaker, so who am I go judge that? I linked Bootstrap (JavaScript) to the html via the CDN download link- linking it like this CODE <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> . Unfortunetly because I am doing this at school (I'm not breaking rules) and my main HTML file is at home but I will try when I get home.Again thanks for the quick reply. |
pandy |
Jun 16 2014, 07:49 AM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Well, if it is an HTML file it should have the .html extension.
That looks like a style sheet more than a JS file you link to. |
jimlongo |
Jun 16 2014, 08:49 AM
Post
#7
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
The Bootstrap css link is fine.
The file needs to be myfile.html not myfile.txt to render in a browser. |
Biggles |
Jun 17 2014, 02:32 AM
Post
#8
|
Group: Members Posts: 7 Joined: 16-June 14 Member No.: 21,095 |
The Bootstrap css link is fine. The file needs to be myfile.html not myfile.txt to render in a browser. I have tried changing the default file opener to a browser and still it doesn't work. But it works when I open it via a local host (Netbeans HTML launcher) rather then a local computer (via the files). Again thanks for the quick reply. This post has been edited by Biggles: Jun 17 2014, 02:34 AM |
pandy |
Jun 17 2014, 06:50 AM
Post
#9
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Just drag the file to the browser window or open it via the File menu. Have you changed its extension? Do you still see plain text?
|
jimlongo |
Jun 17 2014, 08:34 AM
Post
#10
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
It's only ever going to work in Netbeans until you change the file extension.
|
Biggles |
Jun 18 2014, 04:59 AM
Post
#11
|
Group: Members Posts: 7 Joined: 16-June 14 Member No.: 21,095 |
I have changed the file extension but I haven't opened it with the browser. And it was worked with Netbeans because I coded it with Netbeans.
You still can reply very quickly, so thanks. |
Biggles |
Jun 20 2014, 10:44 AM
Post
#12
|
Group: Members Posts: 7 Joined: 16-June 14 Member No.: 21,095 |
Just drag the file to the browser window or open it via the File menu. Have you changed its extension? Do you still see plain text? I have tried just draging it into the browser but it still comes up without Bootstrap 'enabled'. Edit: My dad said that it wouldn't load because it didn't like the port it uses and it doesn't use a server host. This post has been edited by Biggles: Jun 20 2014, 10:47 AM |
Frederiek |
Jun 20 2014, 04:55 PM
Post
#13
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
There is no need for a server host for the browser to show an HTML file and javascript, or even CSS.
Maybe if you post the HTML and that bootstrap.js files, and CSS if you use that, then we can take a look at what you have. |
Lo-Fi Version | Time is now: 23rd April 2024 - 08:03 PM |