Do not assume any of we punters have a clue. About what is under the hood.
Nike
···
Sent from my Windows Phone
From:
Art Engel artengel123@earthlink.net [sailwave]
Sent:
21/05/2014 21:39
Subject:
Re: [sailwave] sortable html table results
Huw,
I admit that I hadn’t considered folks not having access to their
webserver. I guess I assumed that if the head scorer had the username
and password to put into Sailwave they would also have the ability to
use FTP but, of course, some users won’t be web savvy.
I don’t think there is any reason to bother Jon. The script and style
file links can be put into the header.txt file and then work just fine.
If a user is sophisticated enough to know what an HTML file is then they
probably are sophisticated enough to edit the header.txt file and upload
the ancillary files via FTP. A simple help page on the website would
probably be more than sufficient for those purposes.
Art
On 5/21/2014 1:19 PM, Huw Pearce huw.pearce@bcs.org.uk [sailwave] wrote:
Art,
Thanks for the information and I agree that reducing bandwidth
consumption is good.My solution works for those who can’t get files other than HTML loaded
to a web server.I will talk to Jon about putting in the HTML just script link not full
code.Kind regards,
Huw
On 21/05/2014 20:50, Art Engel artengel123@earthlink.net [sailwave] wrote:This would put ALL of the sorttable.js file into the HTML file (adding
17K to the size of every HTML file that includes the script). My
research shows that putting more than a line or two of javascript into
an HTML file is considered bad practice in terms of both browser
performance (meaning download and display times) and code maintenance.
In general, if you have two web pages that use the same code and the
code is in the HTML file the user will have to download it twice; if the
code is in an external file then it will only be downloaded once and
cached by the browser. [Same for styles, by the way.]It would definitely be “easier” to buy a new car when your car needed
servicing but it wouldn’t be considered “good practice” (I have a friend
whose wife actually did that once!).My recommendation for good HTML files would be to put your styles into
an external style file and any scripts longer than a line or two into an
external script file. Then, modify the header.txt include-file
accordingly.Art
PS - A minor bug, I think. If I include one script under
Publish>Results>Effects then it works and the script is included in the
HTML file. If I include two scripts, which seems to be allowed, then
neither is included. I don’t use scripts with Sailwave so this is the
first time I’ve noticed this - I tried several scripts together and it
doesn’t seem to be related to the scripts but the number of them.On 5/21/2014 11:34 AM, Huw Pearce huw.pearce@bcs.org.uk [sailwave] wrote:
Hi Scott et al,
There is an even easier way without having to edit any Sailwave
header.txt file or any other Sailwave file.Just put a modified copy the sorttable.js file in the javascript
sub-folder of Sailwave or better in a personal directory that you point
to under Golbal Options, so the file does not get deleted when a full
install of Sailwave is done. I can make a suitably modified file
available, which has incorporated Art’s change and the comment about
the
comments at the start of the file causing problems.Kind regards,
Huw
On 20/05/2014 21:00, Art Engel artengel123@earthlink.net [sailwave] >> wrote:Scott,
Here is still another method to get what you want. It might be simpler
than the other methods suggested as it leaves the Sailwave output alone
except for the addition of the ” and “” lines.Step three: Change the html results file so that the line which has
<table class="summary table" ... is changed to read (and yes, just one "t" in sortable) <table class="summarytable sortable" ....And then the published results should be sortable by clicking on the
column heading.Some notes:
Alternatively, you can add the js file to the sailwave javascript
folder and, then, when publishing results, select the “Effect”
sorttable (and yes, that’s two "t"s in sorttable). In this case - you
can skip step 1 and 2 above (as the javascript will be included in the
results html file). One thing I noticed is that there is a comment at
the beginning of the js file which has a " in it which can cause
problems - if you just remove the lines with the "'s in them from the
comment in the top of the js file (lines 9 and 10), everything works
fine. If you don’t, the " can be interpreted as the end of the comment
and you’ll see some garbage at the top of the results html file when
viewing in a browser. This is not a problem is you do the three steps
above.So my question is, is there a way of getting sailwave to output
<table class="summarytable sortable" .... instead of <table class="summary table" ... when outputing results to the web?And then, as a follow-on question - if you do the above, and you
sort the results by something other than the rank when viewing them,
and you want to view then in place order again, then you have to
reload the page as the sorting sorts in dictionary order 10th,11th,
… 19th, 1st, 2nd, … instead of understanding that these are number
and 1st should come before 10th - so my question is, how do you change
the output format for the Rank so that it is 1, 2, 3 and not 1st,
2nd 3rd?Thanks,
-scott
Posted by: Scott Rickard rickard23@yahoo.com
-!- http://www.yachtsandyachting.com/ -!- http://www.sailing.org/
-!- http://www.sailwave.com/ -!- On-Line Sailwave
help…http://sailwave.com/help/HTML ~ Mark Townsend’s Sailwave User
Guide is available from
http://www.abyc.org/upload/Sailwave_ABYC_User_Guide.pdf ~ Convert to
daily digest of emails send blank email to
sailwave-digest@yahoogroups.com ~ To unsubscribe from the SUG please
send blank email to sailwave-unsubscribe@yahoogroups.com Yahoo Groups
Links
This email is free from viruses and malware because avast! Antivirus
http://www.avast.com/ protection is active.
This email is free from viruses and malware because avast! Antivirus
protection is active.
http://www.avast.com
This email is free from viruses and malware because avast! Antivirus
http://www.avast.com/ protection is active.
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com