Welcome Guest, Not a member yet? Register   Sign In
Need help with a simples javascript script.
#1

[eluser]cdonate[/eluser]
Hi guys. I am at the very begining of my javascript life and I need some help.

I know that this is the codeigniter forum and questions should be pertinent to the framework, but, since all the help I needed since the beginning I got here, I thought I could give it a try.

I need to do something like this at my web page:

I have 3 options that have to be put in decrescent order of preference. First I have the tree options available, if I choose one, this one should desapear and only the two remaining options should be available.
Then I choose the second one and its done.

How should I tackle this?

What I was thinking is, using javascript to create the list of options dynamically and use jquery to show the first <select> field with the 3 options, once one of them is selected the jquery script will show the second <select> field with only the two remaining options.

Will that work?

Any suggestions of a better or simpler way to do that?

Thanks guys!

Cheers!
#2

[eluser]vitoco[/eluser]
i will do that differently, i'll use 2 list( <ul> and <ol> ), the first one (<ul>) to the options, and add the click event to every <li> inside, so when the user click it, it should be removed from the <ul> and appended to the <ol>. Also you can add the same event to the <li> items on the <ol>, and do the reverse operation. Note that if you do the reverse proccess you must use live events.

Saludos




Theme © iAndrew 2016 - Forum software by © MyBB