Skip to main content
Sifweb
Participant
August 26, 2018
Question

Problem previewing page on realtime preview

  • August 26, 2018
  • 3 replies
  • 891 views

I am running dreamweaver 2017 and when i try to preview on real-time preview i get all browsers coming blank. Have tried clearing cache and no luck. can anyone help am stuck for days. on chrome it shows this error:

Failed to load resource: the server responded with a status of 404 (Not Found)

Then on Jquery:

15 Adobe Systems Incorporated.  All rights reserved. */

/*global $, console, URI, unescape*/

/*jslint regexp: true nomen: true, plusplus: true, bitwise: true, vars:true*/

function DevicePreviewUtils() {

    'use strict';

  

    this.createAjaxOptions = function (type, host, location, query) {

        var formedUrl = host + location,

            key,

            uri = new URI(formedUrl),

            options;

       

       

        for (key in query) {

            if (query.hasOwnProperty(key)) {

                uri.addSearch(key, query[key]);

            }

        }

       

        options = {

            'type': type,

            'url': uri.toString()

        };

       

        return options;

    };

   

    this.doAjaxGetRequest = function (host, location, query, successCallback, errorCallback) {

        var ajaxOptions = this.createAjaxOptions('GET', host, location, query);

        $.ajax(ajaxOptions).fail(function (jqXHR, textStatus, errorThrown) {

            // We got an error trying to run the work not sure what to do here

            console.log("call Failed!!  "  + textStatus);

            errorCallback.call(jqXHR, errorThrown);

        }).done(function (data, textStatus, jqXHR) {

            console.log("call succeeded!!");

            console.log(textStatus);

            successCallback.call(jqXHR, jqXHR.responseText);

        });

    };

   

    this.getAccessMethod = function () {

        var uri = new URI(window.location);

        return uri.search(true).m || '';

    };

   

    this.getDwSocketAppUrl = function () {

        return window.preview.config.DW_SERVER_PROTOCOL + '://' +

            window.preview.config.DW_SERVER_HOST +

            (window.preview.config.DW_SERVER_PORT ? ':' + window.preview.config.DW_SERVER_PORT : '');

    };

   

    this.convertPathArrayToString = function (pathArray) {

        if (!pathArray) {

            return '';

        }

       

        var path = '',

            index = 0;

        for (index = 0; index < pathArray.length; ++index) {

            var editedPath = pathArray[index];

            if (editedPath && editedPath.indexOf('DP_CLIENT_SOCKET_ID') !== -1) {

                editedPath = editedPath.replace('DP_CLIENT_SOCKET_ID', URI.encode(window.preview.socketApp.getSocket().id));

            }

           

            path += this.getDwSocketAppUrl() + editedPath;

        }

        return path;

    };

}

window.preview.utils = new DevicePreviewUtils();

    This topic has been closed for replies.

    3 replies

    BenPleysier
    Community Expert
    Community Expert
    August 26, 2018

    Are you sure that the XAMPP server is running? One way to find out is to type localhost into the address bar of the browser.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Sifweb
    SifwebAuthor
    Participant
    August 26, 2018

    Yes it's running have been using it on CS6 and when I put in cc 2017 thus when it started these issues.

    Nancy OShea
    Community Expert
    Community Expert
    August 26, 2018

    My local testing server (wamp) does not play well with Real-Time Preview.  I have found that a right-click on document tab and selecting Open in Browser works much better.

    Nancy O'Shea— Product User & Community Expert
    BenPleysier
    Community Expert
    Community Expert
    August 26, 2018

    No, that is not what I said. I assumed that your were using a server side scripted document without running a server.

    Please show us a screen shot of your Site Setup Server panel like

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Sifweb
    SifwebAuthor
    Participant
    August 26, 2018

    Hi Ben this is my screenshot

    BenPleysier
    Community Expert
    Community Expert
    August 26, 2018

    That usually happens when you try to open a server side scripted document and the server is not running. For example, a PHP document and no PHP server running.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Sifweb
    SifwebAuthor
    Participant
    August 26, 2018

    OK let change my html page to php and try again