WebSite X5Help Center

 
Tom G.
Tom G.
User

JavaScript  en

Autor: Tom G.
Besucht 2134, Followers 1, Geteilt 0  

I am in process of creating a web page, on which I display some information and Google map, according to parameters taken from the text file. The information from the text file I read using my own JavaScript code. The text file location is Preview\EventFile\All3.txt. The Java script location is Preview\JS\jAll3.js. The function name (defined in jAll3.js) is fGetAll3Info().

I can Preview the page from WebIte X5 – works fine – displays text information and the generated Google map.

It’s not working when opening the page from Preview\ folder, though!…

When checking information in “Inspect Source” – I can see the correct information in the <head> section, highlighted below:

 

But I can also see entries that remain in this section from my testing:

 

When I remove the two .js files from Preview\files\ folder or even delete the entire folder, they “magically” reappear there when opening new session of WebSite X5!

My JS function was tested on the page which I deleted, and the working stuff I implemented on the other (already existing) page.

Anybody can explain to me what happens? Thanks in advance!

Tom

Gepostet am
5 ANTWORTEN
A. Kris
A. Kris
User

hi Tomas,

after you delete the files or folder did you try to ctrl + preview? in this way the program can regenerate all your changes. let me know

Mehr lesen
Gepostet am von A. Kris
Tom G.
Tom G.
User
Autor

Hi Kris,

I just tried it. Deleted Preview\files folder and made sure that Preview\JS\jAll3.js version is the correct one. The moment I press <ctrl> key and click on Preview - the files folder re-appear and old version of jAll3.js replaces the correct version of it in JS folder...

No good...

Mehr lesen
Gepostet am von Tom G.
Tom G.
Tom G.
User
Autor

No attempt to help from supporting team?

Mehr lesen
Gepostet am von Tom G.
Rbbrt WebsiteX5.info
Rbbrt WebsiteX5.info
User

Hi Thomas,

Difficult to debug without the original project... However, lets try some things...

Have you checked whether your Javascript file is in the correct folder on the webserver?

Have you debugged your page already, using the Firefox Developer Edition (the version with the Blue Fox)? That helped me a lot when I try to trace what's going on when writing Javascript.

Succes!

Robert

Mehr lesen
Gepostet am von Rbbrt WebsiteX5.info
Tom G.
Tom G.
User
Autor

Robert,

Having project open and at this point putting right versions of files in the right folders and clicking on Preview - it's fine. I can see the results of the execution of the JavaScript. When immediatelly trying to open the page from the Preview folder - page is blank, no javascript execution.

What bothers me is the appearance of the Preview\files folder which every time I delete, is being re-created by WebSite X5. There is not reference to this folder in my script. Also, the .js code changes to it's old version. Why?

I have redone the page from scratch under different name and it opens correctly. So I can proceed with the development. I just find it interesting why it happens?

Tom

Mehr lesen
Gepostet am von Tom G.