Skip to main content
Participating Frequently
March 12, 2017
Answered

Real-Time Preview not loading JS/CSS files

  • March 12, 2017
  • 1 reply
  • 4088 views

Hi All,

I've been working with Real-Time Preview for the past 2 weeks to build up a HTML page from scratch without any JS. Now I want to merge this HTML code into an existing page that I was creating using Brackets. Now I want to switch to DW (2017.0.1) because of the Real-Time preview which I think is pretty awesome. Now, when I want to show the index.html of the original page none of the linked js or css files are found (hat no issues with Brackets). The error is always 404.

For example for angular.min.cs:

  1. Request URL:http://127.0.0.1:61887/bower_components/angular/angular.min.js
  2. Request Method:GET
  3. Status Code:404 Not Found
  4. Remote Address:127.0.0.1:61887

I guess the reason is that the index.html is loaded in a different path: http://127.0.0.1:61887/preview/app/index.html

Here is the header of my page.

<!DOCTYPE html>

<html lang="en" ng-app="timeZoneApp">

    <head>

        ...

       

        <script src="bower_components/angular/angular.min.js"></script>

        <script src="bower_components/angular-animate/angular-animate.min.js"></script>

        <script src="bower_components/angular-touch/angular-touch.min.js"></script>

        <script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script>

        <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>

        <script src="bower_components/moment/min/moment.min.js"></script>

        <script src="bower_components/moment-timezone/builds/moment-timezone-with-data-2010-2020.min.js"></script>

        <script src="bower_components/underscore/underscore-min.js"></script>

       

        <script src="app/app.js"></script>

        <script src="app/app.controller.js"></script>

        <script src="app/app.factories.js"></script>

        <script src="app/meeting/meeting.directive.js"></script>

        <script src="app/meeting/meeting.service.js"></script>

        <script src="app/meeting/url-shortener.service.js"></script>

        <script src="app/meeting/time-zone.service.js"></script>

       

        <!-- Stylescheets -->

        <link rel="stylesheet" href="bower_components/bootstrap-css-only/css/bootstrap.min.css"/>

        <link rel="stylesheet" href="css/reset.css"/>

        <link rel="stylesheet" href="css/style.css"/>

        <link rel="stylesheet" href="css/bootstrap-theme.css"/>

        <link rel="stylesheet" href="css/grid8.css"/>

        <link rel="stylesheet" href="css/simple-line-icons.css"/>

        <link rel="stylesheet" href="css/index.css"/>

       

        ...

    </head>

    ...

How can I tell DW to use the linked files (i.e. scripts) for the real-time preview as well?

Regards,

Stephan

This topic has been closed for replies.
Correct answer pziecina

Yes, I did.

Server Model is set to None,

Automatically push files is enabled,

Always autosave dependent files is disabled


I'm not certain if setting the server model to none, will work in Dw, as it does expect a server to be defined. I do know that the Azure server is not included in the list (just checked), so that may be a problem.

The problem i have always had with Dw, is that once one moves away from the commonly used environment, (including more advanced html, css and javascript) Dw has little support for them. It is primarily aimed at designers, with a basic code skill.

1 reply

BenPleysier
Community Expert
Community Expert
March 13, 2017

You need to define your site in Dreamweaver. Have a look at How to make a website in Dreamweaver part 1, site setup | Adobe Dreamweaver CC tutorials

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
sarenswAuthor
Participating Frequently
March 13, 2017

I defined a site already. Looking at the link I only stumbled upon the default image path. Please have a look at the image below. Still it is not clear to me why angular.min.js and all the others are not found in the real-time preview.

pziecina
Legend
March 13, 2017

Just a thought, but do any of the files require access privileges to your testing server?