|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hide drop-down box
I need to hide a drop down box. For a car search page, if the user selects "NEW" the mileage drop-down dissappears, but if the user selects "USED" than the mileage drop down appears. I need this on the server side, so I would be needing to use VBScript.
I need guidence...please help Thank you Dizzy |
|
#2
|
||||
|
||||
|
Dop down boxes have a: style='visibility:hidden'. Do you want it to be dynamic or do you know if the box will be hidden/visible when the page is loaded?
__________________
PEACE! |
|
#3
|
|||
|
|||
|
Quote:
I know that it has to be only on the USED page. If u click on the NEW tab the drop down should dissappear, because logically, NEW cars dont have mileage on it. Here is the link I am working on, hopefully that will make it easier for you to help me. http://www.fitzmall.com/carfind/res...NEW&search=USED This link is for USED, so the drop down should appear on this page, but if you click on the NEW tab, the drop down should dissappear. Thanks alot...I owe you one |
|
#4
|
||||
|
||||
|
Hi,
You could disable the select when new is selected. Something like this. <% Dim disabled If newselected then disabled = "disabled" else disabled = "" End if %> <select name="mileage" <%=disabled%>> . . . Or.. If newselected then %> <select name="mileage" disabled> <% else %> <select name="mileage"> <% End if Hope this is what you are looking for. Mark P.
__________________
Mark Pearce Last edited by mpearce : February 17th, 2004 at 02:03 PM. |
|
#5
|
|||
|
|||
|
Here is the piece of code...
Here is the piece of code I have to disable/hide:
<form name="MileSearch" method="post"> <% ' =============================================== MILEAGE RANGE =============================================================== %> <% cSQL = "SELECT distinct miles FROM inventory ORDER BY miles asc" set oRS = oConn.Execute(cSQL) 'Response.Write "<br>" & cSQL %> <%'IF SearchType="USED" THEN MileSearch.Visible=True ELSE MileSearch.Visible=False END IF%> <select name="lstMile" size="1" onChange="GoMile()"> <% Response.Write "<option " & mileRange("0") & " value='**'>-ALL MILEAGE-" FOR mile = 10 to 100 step 10 IF (mile * 1000) > UMAX THEN exit FOR Response.Write "<option value='" & mile & "'" & mileRange(mile) & ">Up to " & mile & ",000" NEXT %> </select> <br><br> </form> |
|
#6
|
||||
|
||||
|
Then why not something like this?
<% ' =============================================== MILEAGE RANGE =============================================================== %> <% IF SearchType="USED" THEN cSQL = "SELECT distinct miles FROM inventory ORDER BY miles asc" set oRS = oConn.Execute(cSQL) 'Response.Write "<br>" & cSQL %> <form name="MileSearch" method="post"> <select name="lstMile" size="1" onChange="GoMile()"> <% Response.Write "<option " & mileRange("0") & " value='**'>-ALL MILEAGE-" FOR mile = 10 to 100 step 10 IF (mile * 1000) > UMAX THEN exit FOR Response.Write "<option value='" & mile & "'" & mileRange(mile) & ">Up to " & mile & ",000" NEXT %> </select> <br><br> </form> <% End if %> |
|
#7
|
|||
|
|||
|
Nevermind---i Got It
I GOT IT!! All i had to do was incase the select tag inside an IF statement.
Thanks for your help...I will definately need the code u provided me for later searches. Thanks |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > hide drop-down box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|