PDA

View Full Version : Triple combo boxes


gina
12-26-2002, 03:48 PM
Hello there,
I am currently trying to set up the triple combo for a web page.
Everything is fine except that I want in some cases to stop at the second box and get to a link from there, without using the third box at all.
Here is where I got the script from:

http://www.wsabstract.com/script/script2/triplecombo.shtml

Any ideas?
Thank you in advance.

Mhtml
12-26-2002, 06:57 PM
I think you may need to tell us the links at which it needs to stop at. I may be wrong I've been up almost 27 hours coding away so I can't make heads or tails of what I'm reading... I think :)

gina
12-27-2002, 08:52 AM
OK, here is the page in which I have put the triple combo:
http://www.vacation-greece.com/greece1.htm

The triple combo allows you to make selections in 3 steps only.

What I want it to do in the example in my page is:
When I go to Booking Information in the first box, it should have 2 selections in the second box which will lead to links when clicked, without using the 3rd box at all.
The two links in the second box should be
Booking Instructions: http://www.vacation-greece.com/VG-TravelClub/instructions.htm
and
Terms of Service: http://www.vacation-greece.com/VG-TravelClub/terms.htm

Am I making any sense?
Thanks a lot for trying.
Gina

By the way, some links in that page do not exist. It is just a testing step so far, not ready yet.

Algorithm
12-27-2002, 09:45 AM
Try replacing the redirect1 function (which is defined near the bottom of the page) with the following.

function redirect1(y){
if(group[document.isc.example.options.selectedIndex][y].value.length>4){
window.location=group[document.isc.example.options.selectedIndex][y].value;
} else {
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
for (i=0;i<secondGroup[document.isc.example.options.selectedIndex][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.isc.example.options.selectedIndex][y][i].text,secondGroup[document.isc.example.options.selectedIndex][y][i].value)
}
temp1.options[0].selected=true
}
}

gina
12-27-2002, 10:49 AM
Thank you,
I did that, but I am getting an error where the new function redirect1 starts.
Here is my new page http://www.vacation-greece.com/greece2.htm
I deleted some selections to make it easier.

Do you thing that the entire script should be changed?

Algorithm
12-27-2002, 11:55 AM
You're getting errors because Frontpage replaced the ">" character with "&gt;". You need to make the change in a text editor so that it won't make that replacement.

gina
12-27-2002, 12:18 PM
Thank you so much, it works perfectly now.
I guess front Page destroys many scripts, this is not the first time it happens.
Gina

gina
12-27-2002, 01:40 PM
One more thing:
Do you think this triple combo can also have the features of a standard drop-down menu box like the one in this page:
http://www.vacation-greece.com
(where it says HOTELS IN GREECE AND THE GREEK ISLANDS)

I am reffering to the script that allows the new link to do the following:
1. open in a new window
2. open in a specific sized new window
3. Have many such window options

Thank you,

Gina

dframeli
03-02-2009, 07:12 PM
Please see the link shown below. I'm using jkd's quad combo source in my application:

http://codingforums.com/showthread.php?t=94737

I'd like to modify the quad combo as "Algorithm" has recommended above, so that in a few select cases, visitors to my site can make just 3 selects, rather than all 4.

I tried Althorithms suggestion... It works fine in a triple combo. However, I cannot seem to get it to work in the case of the quad combo.

In my case, the redirect either does nothing, an error occurs, or visitors are forced to make a 4th, unneeded, selection before the redirect occurs.

I'm under pressure to meet a deadline, can anyone suggest a fix?


function ReDirect2(y){
var x=document.CBN.CBN1.options.selectedIndex
if(ComboBox2[x][y].value.length>4){
window.open(ComboBox2[x][y].value);
} else { for (m=temp1.options.length-1;m>0;m--) temp1.options[m]=null
for (i=0;i<ComboBox3[x][y].length;i++){
temp1.options[i]=new Option(ComboBox3[x][y][i].text,ComboBox3[x][y][i].value)
}
temp1.options[0].selected=true
ReDirect3(0)
}
}