Jump to content

Search the Community

Showing results for tags 'sort'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 12 results

  1. Hi I am new to javascript and was creating search suggestions referring to the article on https://www.w3schools.com/howto/howto_js_filter_lists.asp , but the search suggestions in output are not sorted. Can someone guide me on updating this code to get alphabetically sorted suggestions? Thanks in advance
  2. Hi everybody http://www.w3schools.com/js/js_array_sort.asp If I'm right, the JS-Tutorial about sorting arrays randomly has a lack. The order of the array is kind of in a random order at the first glance, but the elements often stay at the same place as they were. This is true in the most for the element at the end of the array and the effect happens in most browsers, but not in all of them. I've written a script to test this. In these browsers the elements are not evenly distributed as they should: Chrome, IE, Edge, Opera. In Safari they were evenly distributed when I tried it. Try it your
  3. Hello All, I am stuck trying to filter results of a json response. I have a sample json response: [ { "id":0, "commentText":"Test", "createdBy":"User1", "isImportant":false }, { "id":1, "commentText":"Hello World", "createdBy":"User2", "isImportant":true }, { "id":2, "commentText":"Testing", "createdBy":"User2", "isImportant":false }, { "id":3, "commentText":"This is another one", "createdBy":"User2", "isImportant":true }, { "id":4, "commentText":"Hello World!", "createdBy":"User2", "isI
  4. Hello, I'm trying to make some kind of leaderboard, such as the example below: var game = ["Dominoes",95,"Cards",22,"Chess",65]; The idea is to try to group all of the numbers together in the array so that I can return a position on them. For example: 95 - would return 1st place (for the most points) 65 - 2nd place 22 - 3rd place But the numbers in the "game" variable would also need to be linked in with the games so that if they were sorted numerically then the games would follow suit as well. Would anyone be able to help with this, please? I'd be grateful for any assistanc
  5. Zerivo

    Sort Table

    Hi i need help for make sort table I want to sort on table, like Shop name, sell type and location etc so if i press button sort location then sort a-z from top to bottom. how i can do it? like it: <table border="1"> <tr><td>Shop name</td><td>Type shop</td><td>location </td></tr> <tr><td>The Common Defense</td><td>Armor Shop</td><td>New Sorpigal</td></tr> <tr><td>The Eagle's Eye</td><td>Weapon Shop</td><td>Castle Ironfist</td></tr> <tr>
  6. etsted

    sorting

    i have created a guestbook for my website, but everytime i add a comment it just put the comment below the other. I want it so that the first page only shows maybe 35 comments, then a new page will be created and then 35 comments can be placed there etc. echo "<h1>guestbook</h1>"; echo "<hr />"; $form = " <form action='index.php' method='POST'> <table> <tr> <td>name:</td> <td><input type='text' name='name' /></td> </tr> <tr> <td>message:</td> <td><textarea rows='5' cols='30' name='message'
  7. Hello guys, i need some experienced info here.. i need to sort selected data, thats why i used case like: SELECT * FROM Customers ORDER BY CASEWHEN CustomerName LIKE '%a%' THEN 1WHEN CustomerName LIKE '%b%' THEN 2ELSE 3END Everythings fine here, but I need to sort each sector (1, 2 and 3) seperately by CustomerName`s lenght. How to do that? any ideas ?
  8. Hey everyone here is what i have so far..... <?php$posts = get_posts('numberposts=10&order=DESC&category=68&orderby=post_title');foreach ($posts as $post) : start_wp(); ?><?php echo "<hr>"; ?><?php echo the_event_end_date( $id, $showtime, $dateFormat); ?><?php echo "<hr>"; ?><?php the_title(); ?><?php the_excerpt(); ?><?phpendforeach;?> I need the the_excerpt and the the_title to sort in order from soonest to later. (event happening soonest to the one happening later that year)This code the_event_end_date( $id, $showtime, $dat
  9. I have an array full of smaller arrays. The smaller arrays contain elements, one of which is a date. (Not a timestamp, a date such as 1, 2, 3, etc.) I want to sort the small arrays within the large array in order of this date. I don't see anything in the docs for PHP on how to do this.Let me state this another way. I have an array called $eventsThisMonth. I would like to sort $eventsThisMonth by $eventsThisMonth[every][dateOfThisOccurrance]. Thank you in advance for your great help and advice. Jeff P.S. I tried sorting "manually" using an outside loop that goes 1-31 (for the possible v
  10. Hi there!!W3schools has demonstrated how to sort a numerical array using the following code: <code><script type="text/javascript">function sortNumber(a, {return a -b;}var arr = new Array(6);arr[0] = "10";arr[1] = "5";arr[2] = "40";arr[3] = "25";arr[4] = "1000";arr[5] = "1";document.write(arr + "<br />");document.write(arr.sort(sortNumber));</script></code>I just wanted to know how does the sortNumber() function work? What's the meaningful of the a,b parameters which are passed into the function? What are they intended to represent, and how does this snippet: a-b c
  11. Hi everybody, First post here, hoping someone can help. I'm looking for a way to specify a primary and secondary column to sort by in a table. For example, a list of people that are to be contacted in an emergency, some of whom are "Primary" contacts, and some who are "Alternate" contacts. What I want is for the primaries to be listed first, in alphabetical order, before any alternates, who are also listed alphabetically. (Primary and Alternate have also been assigned a numerical value, with Primary being 1 and Alternate being 2.) Currently, these table sort only on one node, the person's
  12. I have an asp form where a user can select their campus and class section. I want to use their answers (variables) in the xsl file to pull only those options from the xml file. Anybody have an idea of how to make this work? Here is my xsl file: <?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <table cellpadding="5" cellspacing="0" border="1"> <thead> <tr> <th>Class</th> <th>Type</th> <th>Day</th> <th>Time</th&
×
×
  • Create New...