Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Order Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Order Problem

 Post Reply Post Reply
Author
rock View Drop Down
Newbie
Newbie
Avatar

Joined: 16 September 2002
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote rock Quote  Post ReplyReply Direct Link To This Post Topic: Order Problem
    Posted: 11 August 2003 at 1:32pm

I have made a script for request forms that just takes anything passed to it and send it via CDONTS.  The problem I have encountered is that the order the items are displayed in are really weird. I was wondering if anyone knows how to order this.

  Dim varRequestVariables, varRequestVariablesKeys
  Set varRequestVariables = CreateObject("Scripting.Dictionary")
  For each InputField in Request.Form
    For each InputValue in Request.Form(InputField)
      If varRequestVariables.Exists(InputField) Then
        varRequestVariables(InputField) = varRequestVariables(InputField) & "," & Trim(InputValue)
      Else
        varRequestVariables.Add InputField, Trim(InputValue)
      End If
    Next
  Next

  For each InputField in Request.Form
    For each InputValue in Request.Form(InputField)
  If (InputField <> "x") and (InputField <> "y") then
    varNewMailContent = varNewMailContent & InputField & ": " & InputValue & vbCrLf
   End If
    Next
  Next

Back to Top
b_bonnett View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Location: New Zealand
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote b_bonnett Quote  Post ReplyReply Direct Link To This Post Posted: 12 August 2003 at 3:51am

http://www.pd9soft.com/aspFormMail/index.asp (all right, so I am slightly biased towards that ).

Basically, for the alphabetic sort, we used the Split() function to split the Request.Form data up, got the left hand side (i.e. field names), performed a alphabetical sort (plenty of scripts for these out there) on them and shoved them and their values into the body of the email.

Blair

Webmaster, The Plane Gallery
Greetings From Christchurch
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 12 August 2003 at 8:48am

"How can I retrieve the fields in my form in the order they appear in the form?"

http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=64

Contribute to the working anarchy we fondly call the Internet
Back to Top
rock View Drop Down
Newbie
Newbie
Avatar

Joined: 16 September 2002
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote rock Quote  Post ReplyReply Direct Link To This Post Posted: 12 August 2003 at 9:57am

b_bonnett,   Thanks for the link. I got it to work now. 

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.