SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sorting xsl with javascript onclick event

    How can I do this, i've seen a few examples, but haven't seen what i'm after.

    http://andrew-j.port5.com/sphinx/xml.xml

    Basically I need to sort the values either alphabeticaly or numericaly, by click the headers.
    Last edited by Andrew-J2000; May 12, 2002 at 08:27.

  2. #2
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Best bet is to avoid JS in this altogether (unless you're not worried about non-IE browsers not supporting the sorting). Just make each of the headers a hyperlink with a different param appended to the URL, which the ASP page grabs and passes as a parameter to the XSL before processing.


    M@rco

  3. #3
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well at the moment i'm not worried about other browsers, i know this can be done in javascript, and i dont particurly want to have to use a server side language as i might as well make it all in a server side language.

    thanks for the help M@rco, but do you have any other ideas?

    ps sites up again ftp messed up
    Last edited by Andrew-J2000; May 12, 2002 at 12:16.

  4. #4
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have a play with the stuff on this page:
    http://www.xmlpitstop.com/default.as...pe=XMLEXAMPLES


    M@rco

  5. #5
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cheers M@rco thats exactly what i need, i was looking in the wrong direction, as i thought it was x-paths, well it is kinda but thanks again.

  6. #6
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)



    M@rco


Bookmarks

Posting Permissions

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