Publishing external javascript files

Issues related to previewing and publishing your web site.
Post Reply
ncpunt
 
 
Posts: 4
Joined: Sun Oct 24, 2021 12:44 pm

Publishing external javascript files

Post by ncpunt »

I am using web builder for designing the GUI of a photino application. I put all my javascript in a single file (main.js) that I maintain using Visual Studio. I added this file to a web builder project using Site Manager ("Add external file"). But any changes in the javascript file are not propagated to web builder. Is there no way to publish externally maintained files?
User avatar
Pablo
 
Posts: 21575
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Publishing external javascript files

Post by Pablo »

The option 'external file' is only for HTML pages, so you can make them part of the site structure.
If you want to add other files then you can use the File Publisher object.
https://www.wysiwygwebbuilder.com/add_html.html
ncpunt
 
 
Posts: 4
Joined: Sun Oct 24, 2021 12:44 pm

Re: Publishing external javascript files

Post by ncpunt »

Yes, that works perfect! This allowes me to use Web Builder (GUI) and Visual Studio (C#.NET and JavaScript) side by side for application development in which Web Builder takes the role of the GUI designer like the WinForms designer in Visual Studio. I think for people like me the <HTML> component in combination with the File Publisher make Web Builder a very attractive solution for programmers. I love it.
ncpunt
 
 
Posts: 4
Joined: Sun Oct 24, 2021 12:44 pm

Re: Publishing external javascript files

Post by ncpunt »

It worked perfect initially. Changes in the source files were nicely propagated to the published web site. But this stops at random after, which I am required to remove all modified files from the File Publisher and add them back again. This can lead to instant insanity.
User avatar
Pablo
 
Posts: 21575
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Publishing external javascript files

Post by Pablo »

Note that if you you enable 'Asset Management' in Tools -> Options -> Files & Folders then the files will be copied to the projetc folder.
So, in that case you will need to replace the files in that folder.

If you uncheck 'Asset Management' then the files will be loaded from the original location.
ncpunt
 
 
Posts: 4
Joined: Sun Oct 24, 2021 12:44 pm

Re: Publishing external javascript files

Post by ncpunt »

Works! Thank you so much.
Post Reply