Page 1 of 1

Trouble with Alternative Daily Summary

Posted: Mon 07 Apr 2014 7:50 am
by bobhutton
Good Morning,
I have been trying hard to use Alternative Daily Summary without success. I am certain that I have followed the instructions in the pdf and all I get is shown in the attached screenshot.
Image1.jpg
Is the problem with my browser (Firefox 28) or me?

Any help would be greatly appreciated.

Bob

Re: Trouble with Alternative Daily Summary

Posted: Mon 07 Apr 2014 8:04 am
by steve
I don't know what 'Alternative Daily Summary' is, but one possible explanation is that you're using a file:// URL; if the code uses javascript/jQuery etc to fetch the data, that will almost certainly require http and a web server.

Re: Trouble with Alternative Daily Summary

Posted: Mon 07 Apr 2014 8:14 am
by bobhutton
My apologies. What I should have written was Alternative version of "Annual Daily Summary" as posted here

Re: Trouble with Alternative Daily Summary

Posted: Mon 07 Apr 2014 8:22 am
by steve
I wasn't being pedantic, I don't keep up with the many third-party offerings that are posted here, and I'm none the wiser after your correction. But if it does use javascript/jQuery, then the explanation is almost certainly the one I suggested.

Re: Trouble with Alternative Daily Summary

Posted: Mon 07 Apr 2014 8:25 am
by sfws
Hello Bob
You are using my coding, although since I do not use it operationally (the version I routinely use now has selectable months and displays all days of that month for all years, instead of select year and display all months) I will need to revisit it to remind myself of how I set it up.

The problem will not be with the browser, as Steve says it uses the jQuery library to create javascript code that works in any browser. From your screenshot, it appears it has not opened the dayfile.txt. That could be due to security settings in your browser, as Steve says it may be the file is not being opened because the browser thinks that is external to the web page and you are not in a server environment (I use Apache XAMPP http://sourceforge.net/projects/xampp/?source=dlp), but that should give an error message. Because no error message is shown I suspect the browser has aborted as it tries to parse the script, before it even tries to open the daily summary log. I did test throughly the code (mostly in Firefox but very quickly in other browsers) before I put it on the forum, but it is possible an odd curly bracket character or similar has somehow got deleted in the script after that test but before I zipped it up. See original thread where I have now posted the latest version of the script file.

Maybe this version of the script will solve your problem instantly, if it does not then I have the documentation wrong, and I need to add instructions on how to create a server type environment for testing. I have a busy life and cannot devote much time to support, I need to go out now, but meanwhile can I thank you for trying my code and apologise if I have wasted your time.
EDIT - correcting my spelling errors

Re: Trouble with Alternative Daily Summary

Posted: Mon 07 Apr 2014 12:50 pm
by bobhutton
Thanks for taking the time to help out.

What I did was to download the Alternative Daily Summary6.zip file to my downloads directory.
I extracted the files to a directory C:\ Alternative Daily Summary6 and copied:
Daily.html
ReadDayfile(part_minimised).js
Rainfall_rate_key.png
Dayfile(test).txt
Weatherstyle(dayfile).css

To directory c:\test as suggested in the.pdf.

If I double clicked on the daily.html, I got the result shown on the attached image.

Following your reply, I tried the updated files you attached and the result was the same.

Thanks again for your help.

Bob

Re: Trouble with Alternative Daily Summary

Posted: Mon 07 Apr 2014 1:22 pm
by sfws
Bob
You have done exactly what you should do according to my documentation.
With that new script using c:\test on my machine I see an error message:
this browser has skipped processing get
failed GET.JPG
However, if you download the web server software (Apache XAMPP) and put the files within that you will see
test.JPG
at 'file:///C:/xampp/htdocs/test/daily.html'

What this means is that Steve was right
steve wrote: if the code uses javascript/jQuery etc to fetch the data, that will almost certainly require http and a web server.
So if you use a file transfer process to put the files on your weather site (maybe still in a folder called test) then you should find it does work there.
I need to rework my documentation to explain all this when I get time. Thank you for finding the fault in my documentation. https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=9719 is another thread where I asked why this did not work with certain browsers, that time nobody was able to answer me, but I eventually worked it out for myself. However I forgot all that when I wrote up this pdf.

Re: Trouble with Alternative Daily Summary

Posted: Mon 07 Apr 2014 1:56 pm
by bobhutton
Thank you very much for the valuable assistance.
As soon as I have time I shall download Apache and then I will be in business !
The attraction of your code is that since I do not have any web space I could have number crunching facility that is difficult of-line.

Steve - you were not being pedantic. I should not try to compose messages whilst flitting between my computer and very sick family member. As usual, you were correct in your assessment.

Bob

Re: Trouble with Alternative Daily Summary

Posted: Mon 07 Apr 2014 2:03 pm
by steve
You should find that installing XAMPP will be worthwhile - effectively turning your PC into a web server - as there are a number of other 'add-ons' which you will then be able to use locally, e.g. those which require PHP etc, which will provide you with data analysis not available from Cumulus directly.

Re: Trouble with Alternative Daily Summary

Posted: Mon 07 Apr 2014 2:09 pm
by bobhutton
Thanks Steve
That is very helpful and encouraging, and will certainly following your advice.

Bob