Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Peter74

    Problem retrieving cookie-data

    Hello, I'm having som problems with cookies. From a website I found the following two general functions for setting and getting a cookie: function setCookie(name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape(value) + ((expires) ? &quot...
  2. Peter74

    Sorting array (again)

    Thanks a lot to Dave & Adam who have patiently tried to help me with my sorting problem, I appreciate it :-) I don't have time to get into it right now, but I'll take a look at it tomorow evening. Hopefully it will work this time or I'll return with more questions :-) Thanks /Peter
  3. Peter74

    Sorting array (again)

    I'm terribly sorry, I should have given a better example. I'll try with a more real-world example: Lets say I want to keep a "database" of my CD's. I would do it like this: function Library(band,album,year,genre) { this.band = band this.album = album this.year = year...
  4. Peter74

    Sorting array (again)

    Hi Dave and thanks again :-) This is not exactly what I need. I haven't explained my problem well enough sorry. As I said in my previous posting; I don't know the terminology for all this. Anyway, what you suggest will sort all entries in say lib.vars[0] alphabetically which is not what I...
  5. Peter74

    Sorting array (again)

    Hello Dave, thanks for your reply, This is not exactly what I want. Your code will sort the entries in lib.vars[i] where "i" is some number. What I need to do is sort lib.vars based on one of the "labels" (I don't know the exect terminology here). For example in my example I...
  6. Peter74

    Sorting array (again)

    Hello again, I have an array defined like this: function Library(x,y,z,p,q,r) { this.x = x this.y = y this.z = z this.p = p this.q = q this.r = r } library = new Array(); library[0] =...
  7. Peter74

    Sorting problem

    That was it... I spend the entire weekend trying to figure this one out :-) Thanks a lot
  8. Peter74

    Sorting problem

    I think I found what the problem is, but am missing a solution. It appears that when calling an array like: author[sortArray[i]] where "i" is some number, javascript interprets the number in relation to the alphabet. "a" is 0, "b" is 1 and so on. If the array...
  9. Peter74

    Sorting problem

    Hi ChetN, Thanks for your reply. using "var dosort=author.sort()" isn't an option for my as I have severel array working together. author[0] is used in connection with title[0], subject[0] etc. So if I rearrange the array I will break the relationships between these arrays. Any...
  10. Peter74

    Sorting problem

    Hello, I want to make a table of authors sorted alphabetically, but the script on my page (se below) is wrong as it sorts the array "author" like this: author 6 author 8 author 2 author 4 author 1 author 5 author 3 author 7 the html-page looks like this: Sorry for all the...

Part and Inventory Search

Back
Top