Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Combo Box
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Combo Box

 Post Reply Post Reply
Author
silverman View Drop Down
Newbie
Newbie


Joined: 01 March 2008
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote silverman Quote  Post ReplyReply Direct Link To This Post Topic: Combo Box
    Posted: 01 March 2008 at 9:44pm
Hi, I am using asp and I have a combo box which has values such as "JAN", "FEB" etc. What I would like to do is when the user selects "JAN", the page gets posted back into itself and retrieves and displays data from a table in my SQL Database with all the data for "JAN". Then say if the user selects "FEB", the data is pulled out from the DB and displays all the "FEB" info.
I know I have to use an IF ELSE statement and then use a SELECT statement, but just do not know the correct way of doing this! Thanks
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2008 at 11:01pm
well prob best way to do it would be:

have the dropdown shown all time, to skip to another month, the refresh on selection would be done with javascript, search google for that.

then have

strMonth = request.form("month")

if strMonth <> "" then

    select data from table where month = '" & strMonth & ";"

end if

S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
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.