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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2011
    Posts
    148
    Thanks
    18
    Thanked 0 Times in 0 Posts

    building a cell controlled grid in JS

    Hi Peers,

    i am trying to build a template for my work.
    1- it consists of 3 rows of data pulled from a databse based on 3 parameters entered in a form.
    those 2 rows includes 60 cells each ( 60 columns : 60 months)
    2- i will have another 2 empty rows where i have to call another data from another table or enter it manually..
    3- i ll have the last row that will hold calculation results based on the above rows..

    Any idea on how to build that ?


    \please let me know if you need more details or mock up .. it almost like an excel web spreadsheet except that sopme data is pulled directly from a database..


    thank you

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,198
    Thanks
    80
    Thanked 4,453 Times in 4,418 Posts
    Well, for starters, you won't do *THIS* in JavaScript:
    1- it consists of 3 rows of data pulled from a databse based on 3 parameters entered in a form.
    those 2 rows includes 60 cells each ( 60 columns : 60 months)
    JavaScript can't get data from a database (at least not a server-side db). So you'd presumably do that in PHP/ASP/JSP. Easier to do there, anyway.

    I do have to say that I wonder about the adivisability of a single row with 60 columns. That's going to be way wider than any browser screen. You say it is 60 months: I'd break the thing up into one-year (12 month) segments. And so have 5 *GROUPS* of rows, one per year. But that's me.

    Anyway, as long as you are using PHP/ASP/JSP to build those two rows, just use that same code to build blank empty cells (or cells with <input> fields) for the other rows.
    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.


  •  

    LinkBacks (?)


    Posting Permissions

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