Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Collect scripts in Dreamweaver for offline use

New Here ,
Jun 20, 2017 Jun 20, 2017

Copy link to clipboard

Copied

Hi community,

i've coded a Virtual Reality application in Dreamweaver and used many online scripts.

Now i need to present this project offline. How do i download all linked scripts automatically?

Is there also a function to replace the links then in my code?

Thank's!

Best regards,

Julian

Views

392
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 20, 2017 Jun 20, 2017

There's no automatic function for this in DW that I've ever seen (it could be hidden somewhere I've never looked), unless they're on a server you control (Get function). You'll just need to go to the sites where the scripts exist and copy them into new .js files in DW, then link to them. Comment out the real script links and add new links to the local copies...

<!-- <script src="www.external.com/script.js"></script> -->
<script src="local/script.js"></script>

Then when you're done with your offline

...

Votes

Translate
Community Expert ,
Jun 20, 2017 Jun 20, 2017

Copy link to clipboard

Copied

There's no automatic function for this in DW that I've ever seen (it could be hidden somewhere I've never looked), unless they're on a server you control (Get function). You'll just need to go to the sites where the scripts exist and copy them into new .js files in DW, then link to them. Comment out the real script links and add new links to the local copies...

<!-- <script src="www.external.com/script.js"></script> -->
<script src="local/script.js"></script>

Then when you're done with your offline preview, just take out the comment tags and local script links.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jun 20, 2017 Jun 20, 2017

Copy link to clipboard

Copied

LATEST

If all the remote scripts are in the same location and therefore have the same initial path, then there would be a way to do this. If you had considered this issue before you built this project, it would have been easier to deal with.

You don't tell us if you are using a database, PHP, or what languages. What kinds of scripts are these? Are you using an Apache local server during development?

What you want to do is determine what is different between the local environment and the remote environment, and use that to create a conditional. For instance, if the remote environment uses SSL, you might do something in PHP like this:

if($_SERVER['SERVER_PORT'] != '443') {
// SSL is not used, so it must be the local environment
$root_path_to_scripts = "http://localhost/";
} else {
$root_path_to_scripts = "https://remotehost/";
}

. . .but if the scripts are not in the same path, you would have to write a conditional for each script, which is sloppy and would be timeconsuming if you have many scripts.

EDIT: After I posted my response I saw Jon's. That's probably the approach to take.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines