There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Nesting a ASP case within an ASP Case


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
smooth's Avatar
Distinguished Member with 3,485 posts.
 
Join Date: Sep 2005
Location: NC, USA
Experience: Learning everyday :)
06-Mar-2007, 11:36 AM #1
Nesting a ASP case within an ASP Case
Hi everybody

Here is a snippet of the code on a web page I have:

HTML Code:
 <form name="chooseType" method="post">
	  Select your training: 
	  <select name="frmItems" onChange="form.submit()"> <option value="0" selected>Select Training</option> <option value="1">By Company</option> <option value="2">Product</option> <option value="3">Sales</option> <option value="4">Web Conferences</option> </select> </form> <br /> <%
	  Dim strFrmValue
	  strFrmValue = Request("frmItems")
	  Select Case strFrmValue
	  Case 1 %> <table cellpadding="0" cellspacing="0" id="innerTable"> <tr> <td id="innerTableHeader"><div align="left">By Company</div></td> </tr> <tr> <td id="innerTableContent"><div align="left"><a href="javascript:;">Americo</a> <ul> <li><a href="javascript:;" onclick="MM_openBrWindow('by_company/americo/americo_audio/why_americo_32806.asp','','width=375,height=97')">Why Americo?</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_series.wmv" target="_blank">HomeMortgage Series</a></li> <li><a href="by_company/americo/americo_video/americo_software.wmv" target="_blank">Software</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_application.wmv" target="_blank">HomeMortgage Application</a></li> </ul> </div></td> </tr> <tr> <td id="innerTableContent"><div align="left"><a href="javascipt:;">Colorado Bankers</a> <ul> <li><a href="javascript:;" onclick="MM_openBrWindow('by_company/americo/americo_audio/why_americo_32806.asp','','width=375,height=97')">Why Americo?</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_series.wmv" target="_blank">HomeMortgage Series</a></li> <li><a href="by_company/americo/americo_video/americo_software.wmv" target="_blank">Software</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_application.wmv" target="_blank">HomeMortgage Application</a></li> </ul> </div></td> </tr> <tr> <td id="innerTableContent"><div align="left"><a href="javascript:;">F&amp;G</a> <ul> <li><a href="javascript:;" onclick="MM_openBrWindow('by_company/americo/americo_audio/why_americo_32806.asp','','width=375,height=97')">Why Americo?</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_series.wmv" target="_blank">HomeMortgage Series</a></li> <li><a href="by_company/americo/americo_video/americo_software.wmv" target="_blank">Software</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_application.wmv" target="_blank">HomeMortgage Application</a></li> </ul> </div></td> </tr> <tr> <td id="innerTableContent"><div align="left"><a href="javascript:;">Life Investors</a> <ul> <li><a href="javascript:;" onclick="MM_openBrWindow('by_company/americo/americo_audio/why_americo_32806.asp','','width=375,height=97')">Why Americo?</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_series.wmv" target="_blank">HomeMortgage Series</a></li> <li><a href="by_company/americo/americo_video/americo_software.wmv" target="_blank">Software</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_application.wmv" target="_blank">HomeMortgage Application</a></li> </ul> </div></td> </tr> <tr> <td id="innerTableContent"><div align="left"><a href="javascript:;">Shenandoah</a> <ul> <li><a href="javascript:;" onclick="MM_openBrWindow('by_company/americo/americo_audio/why_americo_32806.asp','','width=375,height=97')">Why Americo?</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_series.wmv" target="_blank">HomeMortgage Series</a></li> <li><a href="by_company/americo/americo_video/americo_software.wmv" target="_blank">Software</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_application.wmv" target="_blank">HomeMortgage Application</a></li> </ul> </div></td> </tr> <tr> <td id="innerTableContent"><div align="left"><a href="javascript:;">United of Omaha</a> <ul> <li><a href="javascript:;" onclick="MM_openBrWindow('by_company/americo/americo_audio/why_americo_32806.asp','','width=375,height=97')">Why Americo?</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_series.wmv" target="_blank">HomeMortgage Series</a></li> <li><a href="by_company/americo/americo_video/americo_software.wmv" target="_blank">Software</a></li> <li><a href="by_company/americo/americo_video/americo_homemortgage_application.wmv" target="_blank">HomeMortgage Application</a></li> </ul> </div></td> </tr> </table>
Now, the code as is, allows me to select the type of training from a select box, which brings up HTML based on what is in the Case below it.

That works great, but in this code I have, I need to have it where when I click on "Americo", "Colorado Bankers", "F&G", "Life Investors", "Shenandoah" and "United of Omaha", that the list below it is shown.

In other words, those list items are hidden when the table first come up. Then when I click on one of those names, it will show the list below each name.

I would love it if I could continue using ASP to do this, instead of javascript. I tried nesting a case within the case, but couldn't get it to work properly.

Any ideas on how to do this?
__________________

Meet Your Fellow TSG Members :: Find Out What CWLMST Means :: NCAA Football :: NCAA Basketball


Looking forward to meeting you up in heaven angel

I don't care how bad I feel, when I go to work I make sure I give it my all! Never any less than 12%...

47.5% of all statistics are made up right on the spot

When something is done in ignorance, then its always best to admit that you have no excuse, fix the problem, put it behind you, and move on - valley

Last edited by smooth : 06-Mar-2007 01:07 PM.
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
06-Mar-2007, 12:50 PM #2
Can you change the code tags to html tags?
smooth's Avatar
Distinguished Member with 3,485 posts.
 
Join Date: Sep 2005
Location: NC, USA
Experience: Learning everyday :)
06-Mar-2007, 01:00 PM #3
Quote:
Originally Posted by MMJ
Can you change the code tags to html tags?
What do you mean?
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
06-Mar-2007, 01:06 PM #4
instead of [code][/code] use [html][/html]
smooth's Avatar
Distinguished Member with 3,485 posts.
 
Join Date: Sep 2005
Location: NC, USA
Experience: Learning everyday :)
06-Mar-2007, 01:07 PM #5
Quote:
Originally Posted by MMJ
instead of [code][/code] use [html][/html]
I see what you mean now. Fixed it

*Edit: Didn't mean the code was fixed, just meant that I had fixed the way it was viewed here in the thread. Still needing some help if possible

Last edited by smooth : 06-Mar-2007 02:51 PM.
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
07-Mar-2007, 07:23 PM #6
Are you talking about multiple selections? If you have a live example I can look at I might be able to see what you are trying to accomplish. The code really does no good and doesn't work even in its present state.
smooth's Avatar
Distinguished Member with 3,485 posts.
 
Join Date: Sep 2005
Location: NC, USA
Experience: Learning everyday :)
08-Mar-2007, 10:11 AM #7
Here is a link to a live page:

Test Page

Now, if you select a type, such as "By Company", you will come up with a list that has:

Americo
Colorado Bankers
F&G
Life Investors
Shenandoah
United of Omaha

Under those headings, is a list of different training links. Now, what I want is the links that are under the headings to be hidden to begin with. When someone clicks on "Americo", I want the links listed under it ( Why Americo?, HomeMortgage Series, Software, and HomeMortgage Application) to appear to be able to choose from.

When clicking on the other headings, I want the links for Americo to hide, and only show those links that are listed under whatever heading is clicked on.

Hopefully that will explain it a little better.
__________________

Meet Your Fellow TSG Members :: Find Out What CWLMST Means :: NCAA Football :: NCAA Basketball


Looking forward to meeting you up in heaven angel

I don't care how bad I feel, when I go to work I make sure I give it my all! Never any less than 12%...

47.5% of all statistics are made up right on the spot

When something is done in ignorance, then its always best to admit that you have no excuse, fix the problem, put it behind you, and move on - valley
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
08-Mar-2007, 08:08 PM #8
You could use hidden DIVs with a + button next to the main heading.
Here is something that might help:
http://www.oreillynet.com/pub/a/java...eamweaver.html

Last edited by Rockn : 08-Mar-2007 08:28 PM.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 05:48 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.