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 7 of 7
  1. #1
    New Coder
    Join Date
    Jan 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sortable tables by header

    Hi all, i just have a quick question.

    I have been creating sports tables using microsoft excel and want to publish these onto a website. I can easily copy and paste them over, but the problem im having is that i want to be able to sort each table by clicking on the column header. For example if i want to sort the table by wins id click on the 'Wins' header, or if i wanted to sort it by Percentage id hit the '%' header and it will sort the table.

    Is there an easy way of doing this? Im using Dreamweaver software to create my website. I dont have much knowledge of Java Script and have been on a few websites where it gives you script to do a sortable header table, but i have not been successful in getting it working yet. Is there a way in Dreamweaver to do this?

    If anyone can offer me any advice id be very grateful

    Thanks,

    Halli

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    You want something like this: http://kensall.com/gov/xbrowser/js-only/metaReader.htm

    I found this in less than a minute via Google.

    Try to emulate the code there and good luck.

    Edit: there's no way in dreamweaver that I know of to do that. Of course I don;t really use dreamweaver, except in code view once and awhile...you may need to learn some javascript or another scripting language to do this.
    Last edited by chump2877; 01-15-2007 at 07:46 AM.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #3
    New Coder
    Join Date
    Jan 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeh ive been searching for hours and found several sites like this, but i just dont understand what i have to do. Ive tried several things but just cant work out what needs to be done to make the table sortable by the header.

    I paste my Table into Dreamweaver straight from excel then im stuck. Ive been through a heap of sites trying to work it out but am at a loss

  • #4
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    See my edit above in my previous post
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #5
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    http://www.workingwith.me.uk/article..._table_sorting

    You probably need a tutorial...I can;t find any at the moment...I tried entering "javascript cross browser sorting table data tutorial" into Google...try entering that or something similar and hopefully you'll come across a tutorial....

    You need something that will teach you what the code is doing, so that you can implement it...so like I said before, you'll need to learn a little javascript...
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #6
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    The Dreamweaver has nothing to do with that. It is a matter of javascript code.
    I might give you one of my sortable table code, but this kind of work is strongly personalized, thus you might need to modify it according to your needs. For that you must know javascript quite well....

    Maybe if you could give us more details... How your head and several rows of your table look in HTML and which is the action user might do to sort upon the column (click on the header cell)?

    And even so, without average knowledge of javascript, you will not be able to understand and to maintain the page/code.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #7
    New Coder
    Join Date
    Jan 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Kor View Post
    The Dreamweaver has nothing to do with that. It is a matter of javascript code.
    I might give you one of my sortable table code, but this kind of work is strongly personalized, thus you might need to modify it according to your needs. For that you must know javascript quite well....

    Maybe if you could give us more details... How your head and several rows of your table look in HTML and which is the action user might do to sort upon the column (click on the header cell)?

    And even so, without average knowledge of javascript, you will not be able to understand and to maintain the page/code.
    Overall Ladder
    # P W L Avg F Avg A Pts% WR%
    1 Bullets 24 19 5 112 100 112.2 79.2%
    2 Wildcats 25 18 7 100 92 108.5 72.0%
    3 Tigers 24 17 7 104 100 104.7 70.8%
    4 Crocodiles 27 17 10 110 106 103.8 63.0%
    5 Kings 25 15 10 100 96 103.4 60.0%
    6 Taipans 26 14 12 100 99 100.6 53.8%
    7 Dragons 26 12 14 103 105 97.7 46.2%
    8 Slingers 25 10 15 100 103 96.8 40.0%
    9 36ers 26 10 16 100 105 95.5 38.5%
    10 Hawks 24 9 15 101 104 97.1 37.5%
    11 Breakers 25 7 18 102 108 94.1 28.0%
    12 Razorbacks 25 3 22 98 110 88.9 12.0%

    This is a sample of the table i want to sort. Basically the header is just where it says 'P' or 'W' or 'L' etc, indicatings wins, losses etc. Now im not sure the format will come up properly on this forum so if you take a look at the link below and scroll down to post no.2 you will get a better idea of the format.

    http://www.punterslounge.com/forum/s...ad.php?t=41409

    I dont think its something that would be too hard to do, but for someone thats just starting out im finding it very difficult, so any tips or help you can give me would be apreciated.

    Thank you
    Last edited by Halli; 01-15-2007 at 11:03 AM.


  •  

    Posting Permissions

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