473,471 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

redirect url using javascript in drop down list

Sirs

How can i use javascript to redirect the url in the drop list box once the
event onchnage is triggered?
Jul 23 '05 #1
1 8194
In article <xfJad.718118$gE.53400@pd7tw3no>, ti******@shaw.ca enlightened us
with...
Sirs

How can i use javascript to redirect the url in the drop list box once the
event onchnage is triggered?


<select onChange="goThere(this.options[this.selectedIndex].value)" name="s1">
<option value="http://someurl.com">place1</option>
<option value="http://someurl2.com">place2</option>
<option value="http://someur3.com">place3</option>
</select>

<script type="text/javascript">
function goThere(loc)
{
window.location.href=loc;
}
</script>

Oh, and I'm a 'miss', thank you. ;)

--
--
~kaeli~
The Bible contains six admonishments to homosexuals and
three hundred sixty-two admonishments to heterosexuals.
That doesn't mean that God doesn't love heterosexuals. It's
just that they need more supervision.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

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

Similar topics

3
by: Dharmen | last post by:
Hey Guys, I have a SQL database called price and a table called TB1, in it i have a column called "loc" I want to display the tiems in "loc" in a drop down list. I am able to do this in a...
4
by: fazee.ent | last post by:
i am using a drop down list and have sucessfuly populated it proble is this i have set DataValueField = "cat_id" but value for dropdownlist appears a string "cat_id" instead of numer value of...
5
by: ashok893 | last post by:
I'm using two drop down list ina form. I have generated the first drop down list from MySQL database. When i select an option from first drop down list, i have to generate second drop down list...
2
by: kalaivanan | last post by:
hi, i am developing web application using c#. in a particular page i am using two drop down list boxes, one for product and the other for corresponding models of a product. whenever i select a...
1
by: YASIN786 | last post by:
hi all dis yasin<yasinkoraya@yahoo.com> i am creating a web site for a company at the moment. this is the scenario: the company has many stores throughtout the country. on the home page they...
2
by: NickMc71 | last post by:
Hello, I have the following JS code: function MM_load() { var x=document.getElementsByName("newDDL"); for(var i=0;i<=x.length-1;i=i+1) {
5
by: dmj07 | last post by:
Hi all, I would like to know a way to add a label to an update panel by using a drop down list selected item. For example: There is a list of items in a drop down list, the user selects one...
7
by: coolnags | last post by:
Hi, As we know IE SELECTdrop down list has limitations on tool tip on individual option items and also horizontal scroll bar. Can any one please tell any other alternative to show the tool...
0
by: StarLavender | last post by:
Hi. I want to create a search form using the drop down list and checkbox. First, the users have to select from drop down list whether they want to search by date or id. After that, for example, a new...
0
by: Gary Tan | last post by:
Hi i am working on a asp.net website which would route a path on a Google map using 2 drop-down list(departure country and destination country) and a button,database connection is already done,coding...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.