469,575 Members | 1,695 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

newbee function call question...

Mel
I have a selection box with 3 values. what i need is to pass 3 urls to
a function that has a switch statement and based on the selection
index goes on one of the tree urls.

Question is how do i pass these three urls to the function i already
have ? The list size may change and does not necessary have to remain
as 3

thanks for lifting a newbee to greater heights

Apr 5 '07 #1
2 1221
Mel wrote on 05 apr 2007 in comp.lang.javascript:
I have a selection box with 3 values. what i need is to pass 3 urls to
a function that has a switch statement and based on the selection
index goes on one of the tree urls.

Question is how do i pass these three urls to the function i already
have ? The list size may change and does not necessary have to remain
as 3

thanks for lifting a newbee to greater heights
Show your code so far, keeping it simple,
most of us in this NG are not in the business of free programming.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 5 '07 #2
On Apr 5, 1:31 pm, "Mel" <MelHer...@gmail.comwrote:
I have a selection box with 3 values. what i need is to pass 3 urls to
a function that has a switch statement and based on the selection
index goes on one of the tree urls.

Question is how do i pass these three urls to the function i already
have ? The list size may change and does not necessary have to remain
as 3
<select onchange="runFunc(this)">
<option value="http://web.address1.com"Go to URL 1</option>
<option value="http://web.address2.com"Go to URL 2</option>
<option value="http://web.address3.com"Go to URL 3</option>
</select>

--
function runFunc(W){
window.location.href=W.value
}

Apr 9 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Newbee Adam | last post: by
3 posts views Thread by Harry Whitehouse | last post: by
2 posts views Thread by Jonny | last post: by
3 posts views Thread by gimme_this_gimme_that | last post: by
2 posts views Thread by Rene | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.