Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    BAW
    BAW is offline
    New to the CF scene
    Join Date
    Nov 2010
    Location
    Slough, UK
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post

    Need To Create An Automatic Updating League Table!

    Hi,

    First the background information - I run a website for the FA, they have recently launched an Under 21's League. They want the Fixture & Results posted on the site, with a league table.

    There is the problem, I need to league table to automatically update according to the results I put in.

    I believe JavaScript is capable of this, I have spent the last few days learning a basic ~ intermediate level of JS. However, I am still stuck.

    If you think you could help me out then reply here, I know this is one hell of a lot of coding so if you can only point me in the right direction that would be great!


    A side note -- I was thinking about it and well the JS needs to pull information from another internal web page, which I believe it cannot do. However, I'm lead to believe it could read it from a file on the server? If so I guess I will need to create a form to submit the results?

    Hope someone can help me out

    Thanks,
    Ben

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,314
    Thanks
    203
    Thanked 2,565 Times in 2,543 Posts
    As you say, one hell of a lot of coding.

    Have a look at
    http://www.codingforums.com/showthread.php?t=160272
    which may provide some tips.

    Used with an AJAX call Javascript can read from a file on the server.

    You should really go for a server-side solution with a database.

    But if this is a website for the FA you ought to pay a professional to do the job. "A few days" study of Javascript is not at all adequate.


    "Success is the ability to go from one failure to another with no loss of enthusiasm." - Sir Winston Churchill, British politician (1874 - 1965)
    Last edited by Philip M; 11-07-2010 at 05:00 PM.

  • #3
    BAW
    BAW is offline
    New to the CF scene
    Join Date
    Nov 2010
    Location
    Slough, UK
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Philip M View Post
    As you say, one hell of a lot of coding.

    Have a look at
    http://www.codingforums.com/showthread.php?t=160272
    which may provide some tips.

    Used with an AJAX call Javascript can read from a file on the server.

    You should really go for a server-side solution with a database.

    But if this is a website for the FA you ought to pay a professional to do the job. "A few days" study of Javascript is not at all adequate.


    "Success is the ability to go from one failure to another with no loss of enthusiasm." - Sir Winston Churchill, British politician (1874 - 1965)
    Hey Philip,

    Unfortunately that is not what I am looking for
    I know that a few days of JS study is nothing, tbh I have learnt a lot but that is only the bare-bone basics of the language!!

    It is for the FA yes. However, as it is more of a local FA website they are not willing to put much money into it, hence the reason a 16 year old "computer wiz" (NOT) has been asked to make it! And not a pro! Don't get me wrong I love doing it, great thing to practise!

    I can type it all into a table manually for the time being as there are only a few teams but the league is expected to expand next year 2 or 3 times so I need to be prepared!!

    I use a CMS called E107, and have looked up and down for a plug-in, literally 10mins ago I found a potential plug-in I could use but the author of the plug-in has not finished it and I don't think he is willing to release it so that's annoying!!

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,688
    Thanks
    80
    Thanked 4,650 Times in 4,612 Posts
    There is an only mildly hacky way you can do this.

    If you have Excel (or maybe a freebie equivalent), you could enter the info into a spreadsheet, on your computer. Or, of course, let somebody else do the work of entering results each week. Most people who are marginally computer literate can handle entering data into Excel.

    Then you EXPORT the Excel data as a "CSV" file (Comma Separated Variables), which is an ordinary text file. Upload that to the site, and then your JS code could, indeed, read that text file and parse it, in order to show results in a web-bish way.

    A CSV file will come out looking something like this:
    Code:
    "Team","Opponent","MatchDate","ScoreFor","ScoreAgainst"
    "xyz","abc","6/11/2010","3","1"
    ... etc. ...
    And that *can* be parsed by JS coding.

    But it would be even easier if you are able to specify that the DELIMITERS used are *NOT* commas and that quote marks are NOT put around each value.

    Instead, ask that the delimiters be TABs. And then parsing the text file in JS is nearly trivial.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •