Date:  12/19/2013 05:24:23 PM Msg ID:  004645
From:  Gregg Barfield Thread:  004640
Subject:  Re: Twitter Bootstrap
It just produces a webpage with simple links to javascript files.    Its the same thing I've done hundreds of times over the years (been a foxweb user since about 1997).
 
I sent a copy of the exact HTML to support@foxweb.com so you can look at it. 
 
Thanks!
 
Sent by FoxWeb Support on 12/19/2013 04:40:40 PM:
I don't think I have enough information to provide assistance at this point. What does your initial FoxWeb script return?
  • An HTML document, with javascript code included in <script> tags
  • An HTML document, with the href attribute of a <script> tag pointing to a FoxWeb script, which generates a JavaScript document on the fly and returns it with application/javascript mime type
  • Something else 
In general I like to keep my JavaScript code in separate files, because this allows browsers to cache them, but in this case I recommend the first option (JavaScript embedded in your HTML file), because it avoids an additional round trip to the server. Another option is to have the static portion of your JavaScript file in a separate document, but keep the dynamically-generated portion in your HTML file. It all depends on the situation.
 
Please describe exactly how everything works and post a simplified version of all relevant code, with all unrelated sections removed to allow us to focus on the issue at hand.
FoxWeb Support Team
support@foxweb.com email
Sent by Gregg Barfield on 12/19/2013 01:48:29 PM:
OK, that was a good idea - and there are some issues.
 
I have never seen this before.  It is saying (in reference to the javascript):
 
"Resource interpreted as Script but transferred with MIME type text/html"
 
It does not matter what I put as the type (I've tried 'application/javascript' and 'text javascript', and also left it blank) - still same error.
 
Another weird thing:   on the directory where the javascript is, looks as if it tries to create a foxpro program file (.fxp) with the same name as the javascript file.
 
Any ideas?
 
 
 
Sent by FoxWeb Support on 12/19/2013 11:01:06 AM:
It is certainly possible that you guessed correctly on the cause of the problem, but you will have to determine this with your browser's developer tools.
 
Depending on your browser the process will be a bit different. In most browsers you can activate the developer tools by pressing F12. From there you should check the resources view to see if your js and css files are being loaded. The scripts view in the developer tools should also show you whether there are any JavaScript errors. 
FoxWeb Support Team
support@foxweb.com email
Sent by Gregg Barfield on 12/19/2013 07:34:28 AM:
 I am trying to dyanamically run html/javascript based on Twitter Bootstrap through foxweb.     Foxweb generates the HTML fine, and when I copy it out onto a regular webpage, it works fine, but when it is generated dynamically by foxweb - all I get is a blank page.
 
 My thougt is that it is not finding the correct JS and or CSS files but it works fine in the same directories that foxweb is running etc. and I have tried putting the JS and CSS everywhere I can think of.
 
Any ideas?