Quickly reordering search results

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 37687
interpreted = N
texte = Hi there,I'm trying to set up a facility so users can easily change the order of items in a search page (which is ordered on the SKU value).So I've creating a button which says MOVE UP. When the user clicks it, I want to simply move it up one place in the search order. I've done this by using [index].I've created a separate variable for each item: [text show=f][interpret]SKU[index][/interpret]=[SKU][/text] which has the value of the SKU.Then when the user clicks the button, the replace command replaces the value of the SKU, with one less than the value of the previous SKU: action=replace&eqSKUdata=[SKU]&SKU=[math][interpret][SKU[math][index]-1[/math]]-1[/interpret][/math]But it doesn't work.... the SKU value is not being replaced with the new value (therefore, no reordeing is happening).All the code is below... it's not exactly rocket science, and seems like it should be really easy ha ha ha.By the way, the SKU is automaticaly created using: [search db=Mailout.db&SKUsort=1&SKUsdir=as&geSKUdata=2&startat=[url][startat][/url]]
[founditems] [text show=f][interpret]SKU[index][/interpret]=[SKU][/text] [/founditems]
 HEADLINE
[index] - [SKU][HEADLINE][hideif [index]=1] [/hideif]
[/search] then on the page it goes to I have:[showif [action]=Replace] [replace db=Mailout.db&eqSKUdatarq=[url][sku][/url]][formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables][/replace] Record Replaced
[commitdatabase db=Mailout.db] [/showif] All help greatly appreciated!! If there is a better way of doing it, I'd love to know it....Regards, TimTim Robinson Art Director imagine online tim@imagine.com.au http://www.imagine.com.au------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Quickly reordering search results (Brian Fries 2001)
  2. Re: Quickly reordering search results (Kenneth Grome 2001)
  3. Quickly reordering search results (Tim Robinson 2001)
Hi there,I'm trying to set up a facility so users can easily change the order of items in a search page (which is ordered on the SKU value).So I've creating a button which says MOVE UP. When the user clicks it, I want to simply move it up one place in the search order. I've done this by using [index].I've created a separate variable for each item: [text show=f][interpret]SKU[index][/interpret]=[SKU][/text] which has the value of the SKU.Then when the user clicks the button, the replace command replaces the value of the SKU, with one less than the value of the previous SKU: action=replace&eqSKUdata=[SKU]&SKU=[math][interpret][SKU[math][index]-1[/math]]-1[/interpret][/math]But it doesn't work.... the SKU value is not being replaced with the new value (therefore, no reordeing is happening).All the code is below... it's not exactly rocket science, and seems like it should be really easy ha ha ha.By the way, the SKU is automaticaly created using: [search db=Mailout.db&SKUsort=1&SKUsdir=as&geSKUdata=2&startat=[url][startat][/url]]
[founditems] [text show=f][interpret]SKU[index][/interpret]=[SKU][/text] [/founditems]
 HEADLINE
[index] - [SKU][url][SKU][/URL]>[HEADLINE][hideif [index]=1] [math][interpret][SKU[math][index]-1[/math]]-1[/interpret][/math]> [/hideif]
[/search] then on the page it goes to I have:[showif [action]=Replace] [replace db=Mailout.db&eqSKUdatarq=[url][sku][/url]][formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables][/replace] Record Replaced
[commitdatabase db=Mailout.db] [/showif] All help greatly appreciated!! If there is a better way of doing it, I'd love to know it....Regards, TimTim Robinson Art Director imagine online tim@imagine.com.au http://www.imagine.com.au------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Tim Robinson

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Text data with spaces in them... (1997) preserving the zero's (1999) Comments in db? (1997) 9 digit zip (2002) [SearchString] problem with [search] context (1997) PCS Frames (1997) Possible Bug in 2.0b15.acgi (1997) Text data with spaces in them... (1997) off topic - dna snipets (1997) talking to MacAuthorize (1997) [subtotal] problems -- help? (1998) Help!!!! (1997) What am I missing (1997) Bug or syntax error on my part? (1997) A little syntax help (1997) Not really WebCat (1997) How do I hyperlink to returned image filename? (2000) Nested vs conditional (1997) A question on sub-categories (1997) CommandSecurity? (1997)