JS Sort Function
I have a JS/ASP application that sorts a SQL populated table.
This works great, and sorts the data fine, apart from my currency columns.
It wants to read the data as text as far as i can gather. Ths data in ASP
looks like this -
<% =formatcurrency(RS("income"),2)%>
I have tried changing this to a number (formatnumber) and hard coding a £
sign, yet it still wants to read the data as text, rather than numerical?
How can i get my JS function to read currency or if not, eliminate the
forehand figures. I need the data to appear as a currency, yet be sorted as
a number (rather than taking the 2st digit)if this is a
common problem (sorting currency) and there was a universal solution around
this
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Select Sort
I have a script that I want to display the returned list numerically in. The database is deciding how to order the list, and is being displayed pretty loosely. Is there anyway I can sort the returned list numerically here? Code:
Sort By Part
I have a database table, that I need to sort by PART of the contents of a field (named rFieldName in the table):sample contents of this field are:Code: qid_5_question_1 qid_12_question_5_0_1 qid_12_question_5_0_2 qid_12_question_5_1_1 qid_12_question_5_1_2 qid_12_question_5_2_1 qid_12_question_5_2_2 qid_12_question_5_3_1 qid_12_question_5_3_2 qid_6_question_2I need to sort his field by the value that appears AFTER the 3rd underscore, and if applicable BEFORE the 4th underscore Is this possible - can you help please - I have no idea where to start on this as I've never had to try to do something like this before.
Sort Text
I've lurked on here for awhile but I've come upon something I'm having trouble with. I have a database table of movie titles and I want to sort by the column, but ignore the articles in the title, "a", "an" or "the"... "The Lion King" would be under L... "A Bronx Tale" would be listed under "B", etc. Does anyone have a function that does this or know of another method? Or am I forced to enter them as "Lion King, The", for example?
Sort Array
Which would be faster? 1) Bubble sort 2) Join Array remove empty delimaters and then Split. I am thinking the second would be a faster routine wouldn't it?
Sort Order?
I have a form that is created dynamically, and all is working fine. But I want users to add an sort order to help list phrases in a certain order. <input type="text" name="AdvantSort" value="" size=1> <input type="checkbox" name="Advantages" value="10"> Phrase1 <input type="text" name="AdvantSort" value="" size=1> <input type="checkbox" name="Advantages" value="20"> Phrase2 so on, so forth... And one clicks on the form, and a SQL statement is executed. However, when I create the SQL statement, INSERT INTO table1 (FormId,AdvantageId,SortOrder) VALUES (<call from form ID>,<advantages>,<advantsort>) Then it loops to allow the next phrase to be entered. The statement also takes the value from every other sort order value including that ones that are in different lines. Which in result, gives me an error, saying the insert columns exceed that of the available columns in the table.
Table Sort
I would like sort table. The table is createobject method (open a function and use SAP connection) and the table not use recordset. is it possible sort table for example or how can i sort table columns. set objTable = myFunc.tables ("Sales") objTable.sortColumn="SalesID", Asc
How To The Sort FileSystemObject?
I'm trying to sort the fso. The file names are named june2004, july2004, august2004, ect... I need to sort them in chronological order starting with the latest one first. The files were recently created so sorting them by the modified or created date will not work. The only other way is to them by the name of the file. I tried converting name of the file into a date using CDate (formated the file names as July 2004, August 2004, ect...) but it did not work. Code:
Sort Problem
region = array("a", "b", "c", "d") I am sorting in desc order that is d, c, b, a, it works fine. Is there a way to sort them as d,c,a,b? How do I do? thanks. Code:select* from mytable Order by region desc
Sort Options
Can u help me generate a javascript to sort the options(list) in an asp listbox control?
Sort By Relevancy
I have an SQL string that does a search using SELECT * WHERE Titlename LIKE '%Crimson%' AND Titlename LIKE '%Skies%' order BY Titlename This gives me all results containing both "Crimson" and "Skies". But I want a result that contains exactly "Crimson Skies" to appear first in addition to the blended results.
Trying To Sort By Month
I have an Access "date/time" column and I am trying to use SQL to select by month. I thought the code below would work (to query for records in april for example) but I am still getting all the records regardless of when the date is. SELECT * FROM comm WHERE comm_requested_date = month(4) Basically, I have a drop menu with the months and I want to query the DB for all records for a particular month.
Sort Posts
I have a simple address-script (its actually a guestbookscript that I changed a bit). Part of the code looks like this: Code: ....
Sort Through My Database
Is it possible to do the following in asp. I have a flash game which saves the name time and email of the users race. Is it possible to sort through my database (ms access) and then display the quikest 10 in flash as high scores? This is my load.asp where my database results are at the mo.
Sort Records Using ASP
I have Table Named "League_Table" in MS Access and data Stored in Table as follow Tm P W D L Pt ABL 2 0 0 2 0 HBL 2 1 1 0 4 KRL 2 2 0 0 6 PIA 1 1 0 0 3 ..................... ..................... ..................... ..................... ..................... ..................... There are 16 Teams in League. Now I want to sort Records on the basis of Points, assign Rank to Teams and display on Web page using ASP.
Sort By Relevance
i have a search/results page. how can i sort records according to relevance? i am using access, asp, nt, iis.
Sort By Total
I have a column which i store my totals (price) and i want to sort the records by total. simple way of ordering as ORDER BY doesn't give correct solution since it sort according to the first number. like this: 1 24465 27184654 i want to sort it like 27184654 24465 1 do you know how?
Sort By Relevance
I'm currently producing a search that looks into 3 tables in my database and outputs all the data. As you can imagine there's a lot of information displayed so I would like to sort the information by relevance displaying a pecrcatage beside each result.
How To Sort Month And Year
i have data likes this post_month post_ year january 2006 . . december 2006 january 2007 february 2007 i need to write a query to display as follows january2006 . . december2006 january2007 february2007
Sort, Filter And Paging In One?
does anyone know where i can get a good free javascript that sorts, filters and pages my ASP page? if it will work with my ASP page and if this is the best way?
Sort Order Displaying Nothing!
I have modified this bit of code from access to MySQL, the page is called and innitially works but once you resort it displays no data! Code:
Asp Sort Records By First Letter
I am using asp and access database on my page Up untill now I have just been listing all catagories from the database on one page, now the list has become huge. I would like to have a page with an alphabetical list of links A, B, C etc and then just display the catagory records beginning with A etc depending on user input.
Adding A Sort On A Field
How to I add a hyperlink sort on a field so that the end user may sort either asc or desc?Here are the file and .inc file.
String Bubble Sort
Can u tell me a bubble sort for strings using ASP? I have a text file of words id like to sort and count.
Sort By Date (year)
I have a date field in an MS Access database. I need to sort this field and print the results to an ASP page. I have done this plenty of times before except this time the date field data includes BCE data. A sample of the data in the date field is as follows: 1300 BCE 930 BCE November 29, 1947 May 14, 1948 1465 CE October 29, 1956 1020 BCE I know that I can not have the data type of the MS Access field set to date/time. I searched online and didn't find too much.
How Can I Sort Records For More Than One Column?
I have a Table with several records with several columns in each record. I need to sort these records based on the column 1 AND then based on the column 2. I used the following SELECT code, but I got error. It doesn't take two ORDER By statement: objRS.Open "SELECT * FROM myTable ORDER BY Col1 AND ORDER BY Col2", objConn, , , adCmdText What is the correct format?
Array Sort Of Question
I have a group of variable i wish to get out of the url like www.domain.com?id1=30&id2=50&id4=99 now i can get the values no problem using request.querystring. my problem is i need to use the more than once, and I want to put them through a loop, to make different lines of code, if i use an array it only picks up the info once then i am pooped. I have tried id&(i) and using a next loop looop, but that only picks up th i as the number not the variable.
Sort The Results Of A Search
I am trying to sort the results of a search. The SQL statement looks like this: strSQL = "SELECT * from DVDTable WHERE [Category] = '"&searchCat&"' ORDER BY '"&by&"' " & order The output of strSQL is as follows: SELECT * from DVDTable WHERE [Category] = 'Action' ORDER BY 'Rating' asc Not sure what the problem is but the results do not get sorted.
Sort Records By Year
I have an access db with 5 years worth of articles. I need to be able to list them according to year from a query string. I am having no luck with this. Can anyone help. SQL is not one of my strong points. vyear = Request.QueryString("year") strSQL = "SELECT * FROM tablename WHERE "& DatePart("yyyy", article_date) &"="& vyear &" ORDER BY article_date desc" I have tried this a few different ways with no luck at all. I keep getting errors.
Sort File Contents
I have a text file where each record has two fields, name and number, separated by a delimiter. I would like to sort the file contents by the second filed, number, and display to browser. I can do this in php readily, but not seeing how to do it in asp. Can it be done?
Sort By Date (year)
I have a date field in an MS Access database. I need to sort this field and print the results to an ASP page. I have done this plenty of times before except this time the date field data includes BCE data. A sample of the data in the date field is as follows: 1300 BCE 930 BCE November 29, 1947 May 14, 1948 1465 CE October 29, 1956 1020 BCE I know that I can not have the data type of the MS Access field set to date/time. I searched online and didn't find too much.
How To Sort Ascending/decending Order
i have a table of data displayed off the database.. there are a few rows, one of them being price and ID, my question is.? is there a way i can jus sort them in des/asc order by jus clicking the Price or ID .
Re-Sort A Drop Down Inside A Form
I have a form in asp that has a drop down of contact - busness names. One side is contact name and other side is business name in this one drop down. I want to create a button or Link for the user to click and re-sort the order of the drop down from contact name to business name. The drop down is in a form already, so I thought about using another form inside my main form to run a requery of the drop down, but I don't think I can run a form inside a form...
Sort Records By Short Date,
I like to pull the top 5 record that are closest to the current date but the date field can not be empty, see some records do not get assigned an expire date and others do. I want to show the closest expiring records. objconn.commandtext = "SELECT TOP 5 * FROM merchants ORDER BY Expires" What do I need to add to exclude the emtpy expires field records.
Alpha Multidimensional Array Sort
I have a multidimensional array with 5 keys. I need to perform a alpha sort on the 3rd key. Does anyone have an example on how to do this?Here is an example of what my array consists of: mArray(i,0) = '2007-05-02" mArray(i,1) = "6:00pm" mArray(i,2) = "TEXT TEXT TEXT" <------------------ NEED TO DO ALPHA SORT ON THIS KEY ----------------<< mArray(i,3) = 6 mArray(i,4) = 4
Sort Files By Date Created
I have files in a folder that I am using the FileSystemObject to read. I can read the files and display links to them no problem, what I want to do is to sort them by date created.What is the best way to go about this?
Sort List Of Files In Directory
I would like to sort (descending) list of files in directory. Parameter is directory url. How I can to do that with ASP not ASP.NET.
How To Sort A Table Based On 3 Columns?
I have a Table with 10 columns and would like to sort this based on columns 2, 7, 5, respectively. I thought my code : objRS.Open "SELECT * FROM MyTable ORDER BY col2, col7 col5", MyDB, , , adCmdText should work, but didn't. How do I do that?
Directory List Sort Order
Im using the following code to display the contents of a directory: <% Set objFso = CreateObject("Scripting.FileSystemObject") Set objFiles = objFso.GetFolder(Server.MapPath(".")) Set fileList = objFiles.Files For Each i in fileList response.write i.name & " - " & i.DateCreated & "<br>" next %> Is there a way I can sort this by Date Created so the most recent files are on top?
DWMX2004 And ASP/VB - Need A Sort By Name Dropdown Through Repeat Region
I've created an ASP/VB page completely with DWMX2004, very minimal code tweaking, using mostly the tools available in DW. Created a Table with a bunch of columns pulling info from MS Access DB, and set a Repeat Region on that table.. I also have Add/Update/Delete pages, etc.. I've been trying to figure out how to add a dropdown box (or maybe several) to Sort on various columns.. like above the Name column, i'd like to be able to sort by Name.. then Zipcode, State, etc.. Maybe if I could Sort the table by clicking on the column Headings, that would be even better.. I have a table with 3 rows and 5 colums.. top row is where my column Headings are.. then a spacer row, and then the info pulled from DB.. i've set the repeat region just on the bottom Row..
Bubble-sort Routine Changing Array Values
I have part of a keyword search function that is acting supernatural - I have a bubble-sort function that sorts the content of an array, then returns an array containing the item numbers of the original array, arranged in order according to their content. Code:
File System Object - Sort By Date Created
I've gotten a subroutine to almost work as I want it to, but it's refusing to show the newest file. It seems to choke on files created near midnight, just never showing them at all, and the date compare is showing an equal number for two different dates, though it surely shouldn't. The code is running here: http://www.devedia.com/wiki/ The object is to show most recent file first, oldest file last. I have some leftover code in here to organize files by month created, but I removed the folders for debugging. The program moves any files created the previous month into a folder on the first of the month. The folder name passed in is an X for recent files, a folder name (like 2005_04) when the files were sorted by folders. What I'm hoping for from the intelligent people in the forum is either an eyeball on the subroutine to help me find where it's losing the midnight/most recent files, or a better idea on sorting by created date using the file system object and asp only. (NO recordset objects.) And here is the subroutine. (sorry about the indenting... copy and paste it to read it better?) Code: ...
Sort Filenames With Download Links By Date - Multidimensional Array ??
i use this script to generate download links from directories which are first passed to an script to record the number a link is clicked. the function is calle with a path like: ListFolderContents(Server.MapPath("/dir1")) my question now is: can i write this to an multidimensional array (or object oriented?) - and then sort it by date ?? if so how ? Code:
Function Inside A Function
Can I define a function inside a function. e.g; function abc() function xyz() ....some code..... End Function End Function I googled this but can't find any related topic.
Function In The InStr Function
I want to use the instr function, but return results from it depending on surtain functions, I can't realy explain so I'll show my example: I have a string in wich some word I want to find might be in diffrent Capital Letters order, I want the Instr function to return all the values of the place of that word (avcourse I'll run a for and increase the starting point of the Instr func until it returns 0). The instinct thought is to use the Lcase or the Ucase functions, but in this case I don't know how to use them. In the same Idea I wanted to use the Instr Func with the trim Func, But Its realy the same principle if I just understood how to do so.
Asp Function
I am trying to call a function in asp to check to see if a varibale has a value stored in it if there is nothing wite the value NA into it. My code is <% Function NullValues(userField) if userField = "" then userField = "NA" end function AccountNo = "" Name = "sam clowes" email = "" AccountNo = (NullValues(AccountNo)) Name = (NullValues(Name)) email = (NullValues(email)) response.Write AccountNo & "<br>" response.Write Name & "<br>" response.Write email & "<br>" %> When I run this code ALL the variables are blank and nothing is output
XML/XSL & ASP Function
the function <% Dim objXML, objXSL Function ShowXML(strXML,strStyleSheet) Set objXML = CreateObject("MSXML.DOMDocument") Set objXSL = CreateObject("MSXML.DOMDocument") objXML.load(Server.MapPath(strXML)) objXSL.load(Server.MapPath(strStyleSheet)) Response.Write objXML.transformNode(objXSL) Set objXML = Nothing Set objXSL = Nothing End Function %> calling the function in an asp file <%Call ShowXML("http://msn.foxsports.com/feedout/syndicatedContent?categoryId=142","nhl/xsl/news/teamNews.xsl")%> the errors 1. the http:// part 2. and the ? mark the error message says that the path has been typed wrong.
|