473,387 Members | 1,664 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

onchange

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>
Jul 19 '05 #1
2 4415
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=<%=iDaysThi sMonth%>">1 Month
<option
value="admindisplaylog.asp?displaydays=<%=iDaysLas tMonth%>">2 Months
<option
value="admindisplaylog.asp?displaydays=<%=iDaysPre viouseMonth%>">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>

"Dodo" <do**@no.fly> wrote in message
news:uK**************@TK2MSFTNGP11.phx.gbl...
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>

Jul 19 '05 #2
something like this:

<form action="detail.asp" method="get" name="frmplace">
<select name="place" onchange="javascript:goplace();">
..
..
..
</form>

<script language="javascript">
function goplace()
{
frmplace.submit();
}
</script>

"Dodo" <do**@no.fly> wrote in message
news:uK**************@TK2MSFTNGP11.phx.gbl...
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>

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jeff | last post by:
Hi Everyone, I'm having a problem with onChange. The tag looks like: <input:text bean = "" name="X" label="Y" attributesText="onChange=\"clear()\""> </input:text> if i replace, onChange...
2
by: Asit | last post by:
In JavaScripts checks for an onChange event against the value of the textbox at the time of the last onChange event. Since an onChange Event never fired after you changed the text first time ,...
1
by: Christoph | last post by:
I'm trying to validate some HTML form elements when the user tabs out of each element. However, I'm having some problems. It appears that the order of events is onChange followed some time...
4
by: Bart van Deenen | last post by:
Hi all I have a script where I dynamically create multiple inputs and selects from a script. The inputs and selects must have an associated onchange handler. I have the script working fine on...
5
by: Good Man | last post by:
Hi there I'm adding form fields on the fly with some javascript DOM programming. I basically just clone a hidden <div>, then adjust node properties to make this new <div> have unique values...
13
by: aundro | last post by:
Hello, I've been looking on the web for a solution to this problem: I create a set of checkboxes, and 2 buttons: - one is labeled "All" - the other is labeled "None" Clicking "All" is...
3
by: jab3 | last post by:
Hello. I"m new to this group, and to JavaScript in general, so please forgive me if I breach local etiquette. I'm trying to implement some client-side 'dynamic' validation on a form. I'm having...
3
by: b_naick | last post by:
I realize that the onChange event for a drop down can be trapped as follows: <select name="myDropDown" onChange="somefunc"> Is it possible to trap the onChange event outside of the select...
21
by: Leena P | last post by:
i want to basically take some information for the product and let the user enter the the material required to make this product 1.first page test.php which takes product code and displays...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.