onchange

D

Dodo

I am interested in learning how to use onchange with the scrollbox in my ASP
page. I would like onchange to function just like the submit button. Does
anyone know a simple implementation? Searching the web has not yielded many
answers that I've been able to decipher.

<form action="detail.asp" method="get">
<select name="place">
<option value="ALL"<%=allsel%>>ALL</option>
<option value="Alexandria"<%=alsel%>>Alexandria</option>
<option value="Arkansas"<%=arsel%>>Arkansas</option>
<option value="Bakersfield"<%=basel%>>Bakersfield</option>
<option value="Baton Rouge"<%=btsel%>>Baton Rouge</option>
<option value="Cleveland"<%=clsel%>>Cleveland</option>
<option value="Connecticut"<%=cosel%>>Connecticut</option>
<option value="East Texas"<%=easel%>>East Texas</option>
<option value="Eureka"<%=eusel%>>Eureka</option>
<option value="Fredericksburg"<%=frsel%>>Fredricksburg</option>
<option value="Gainesville/N.Central FL"<%=gasel%>>Gainesville/N.Central
FL</option>
<option value="Greater Oklahoma"<%=grsel%>>Greater Oklahoma</option>
<option value="Hampton Roads"<%=hasel%>>Hampton Roads</option>
<option value="Humbolt"<%=husel%>>Humbolt</option>
<option value="Kansas"<%=kasel%>>Kansas</option>
<option value="Kansas-Central"<%=knsel%>>Kansas-Central</option>
<option value="Kansas-Northern"<%=kssel%>>Kansas-Northern</option>
<option value="Las Vegas"<%=lasel%>>Las Vegas</option>
<option value="Louisiana"<%=losel%>>Louisiana</option>
<option value="Lubbock-Midland"<%=lusel%>>Lubbock-Midland</option>
<option value="Macon"<%=masel%>>Macon</option>
<option value="New Orleans"<%=nesel%>>New Orleans</option>
<option value="North Carolina"<%=nosel%>>North Carolina</option>
<option value="Northern Virginia"<%=nrsel%>>Northern Virginia</option>
<option value="Oklahoma"<%=oksel%>>Oklahoma</option>
<option value="Oklahoma City"<%=olsel%>>Oklahoma City</option>
<option value="Omaha"<%=omsel%>>Omaha</option>
<option value="Orange County"<%=orsel%>>Orange County</option>
<option value="Palos Verdes"<%=pasel%>>Palos Verdes</option>
<option value="Pensacola"<%=pesel%>>Pensacola</option>
<option value="Phoenix"<%=phsel%>>Phoenix</option>
<option value="Rhode Island"<%=rhsel%>>Rhode Island</option>
<option value="Roanoke"<%=rosel%>>Roanoke</option>
<option value="San Diego"<%=sasel%>>San Diego</option>
<option value="Santa Barbara"<%=snsel%>>Santa Barbara</option>
<option value="Tucson"<%=tusel%>>Tucson</option>
<option value="Tulsa"<%=tlsel%>>Tulsa</option>
<option value="Warner-Robbins"<%=wasel%>>Warner-Robbins</option>
<option value="West Texas"<%=wesel%>>West Texas</option>
</select>
<input type="submit">
</form>
 
D

Don Grover

Sample cbo
<select style="FONT-FAMILY: Chicago, Verdana, Helvetica, Arial,
Arial Black; BACKGROUND-COLOR: #cecece"
onchange="Go(this.form.Navigate.options[this.form.Navigate.options.selectedI
ndex].value)" size="1" name="Navigate">
<option value="">[ Select log size ]
<option value="admindisplaylog.asp?displaydays=1">1 Day
<option value="admindisplaylog.asp?displaydays=2">2 days
<option value="admindisplaylog.asp?displaydays=7">1 Week
<option value="admindisplaylog.asp?displaydays=14">2 Weeks
<option
value="admindisplaylog.asp?displaydays=<%=iDaysThisMonth%>">1 Month
<option
value="admindisplaylog.asp?displaydays=<%=iDaysLastMonth%>">2 Months
<option
value="admindisplaylog.asp?displaydays=<%=iDaysPreviouseMonth%>">3 Months
</select>


<SCRIPT language=JavaScript>
<!--

function Go(x)
{

if(x == "nothing")
{
document.forms[0].reset();
document.forms[0].elements[0].blur();
return;
}
else
{
location.href = x;
document.forms[0].reset();
document.forms[0].elements[0].blur();
}
}
//-->
</SCRIPT>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top