Hi,
I'd like to put a double drop-down menu on my webpage and instead of a redirection to a new webpage, I'd like to display the result in a new section. I'm kind of stuck and I only have a triple menu here. Here an exemple of what I need.
(menu)Size, (menu) color and then display the price somewhere in a box.
Thanks a bunch
Bob
[HTML]<body>
<center>
<FORM name="isc">
<table border="0" cellspacing="0" cellpadding="0" >
<tr align="center">
<td nowrap height="11">
<select name="example" size="1" onChange="redir ect(this.option s.selectedIndex )">
<option selected>Boat lenghts</option>
<option>6-10 M</option>
<option>10-13 M</option>
<option>13-16 M</option>
<option>16+ M</option>
</select>
<select name="stage2" size="1" onChange="redir ect1(this.optio ns.selectedInde x)">
<option value=" " selected>Dokcli nes lenghts </option>
</select>
<select name="stage3" size="1" onChange="redir ect2(this.optio ns.selectedInde x)">
<option value=" " selected> </option>
<option value=" " selected>---Select3----------------</option>
<option value=" " selected>---Select3----------------</option>
</select>
[/HTML] - <script type="text/javascript"><!--
-
/*
-
_____________________________________
-
/ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\
-
| Another JavaScript from Uncle Jim |
-
| Feel free to copy, use and change |
-
| this script as long as this part |
-
| remains unchanged. You can visit |
-
| my website at http://jdstiles.com |
-
| for more scripts like this one. |
-
| Created: 1996 Updated: 2006 |
-
\_____________________________________/
-
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
-
*/
-
var groups=document.isc.example.options.length
-
var group=new Array(groups)
-
for (i=0; i<groups; i++)
-
group[i]=new Array()
-
-
group[0][0]=new Option("---Select2---"," ");
-
-
group[1][0]=new Option("Now Select This One"," ");
-
group[1][1]=new Option("MAIN ONE,SUB ONE","47");
-
group[1][2]=new Option("MAIN ONE,SUB TWO","46");
-
group[1][3]=new Option("MAIN ONE,SUB THREE","45");
-
-
group[2][0]=new Option("Now Select This One"," ");
-
group[2][1]=new Option("MAIN TWO,SUB ONE","115");
-
group[2][2]=new Option("MAIN TWO,SUB TWO","116");
-
group[2][3]=new Option("MAIN TWO,SUB Three","117");
-
-
var temp=document.isc.stage2
-
-
-
function redirect(x){
-
for (m=temp.options.length-1;m>0;m--)
-
temp.options[m]=null
-
for (i=0;i<group[x].length;i++){
-
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
-
}
-
temp.options[0].selected=true
-
redirect1(0)
-
}
-
-
-
-
var secondGroups=document.isc.stage2.options.length
-
var secondGroup=new Array(groups)
-
for (i=0; i<groups; i++) {
-
secondGroup[i]=new Array(group[i].length)
-
for (j=0; j<group[i].length; j++) {
-
secondGroup[i][j]=new Array() }}
-
-
secondGroup[0][0][0]=new Option("---Select 3---"," ");
-
secondGroup[1][0][0]=new Option("---Select 3---"," ");
-
secondGroup[1][1][0]=new Option("Now Select This One"," ");
-
secondGroup[1][1][1]=new Option("M1,S1,P1","navigation.html");
-
secondGroup[1][1][2]=new Option("M1,S1,P2","effects.html");
-
secondGroup[1][1][3]=new Option("M1,S1,P3","utilities.html");
-
-
secondGroup[1][2][0]=new Option("Now Select This One"," ");
-
secondGroup[1][2][1]=new Option("M1,S2,P1","http://jdstiles.com/");
-
secondGroup[1][2][2]=new Option("M1,S2,P2","http://jdstiles.com");
-
secondGroup[1][2][3]=new Option("M1,S2,P3","http://jdstiles.com");
-
-
secondGroup[1][3][0]=new Option("Now Select This One"," ");
-
secondGroup[1][3][1]=new Option("M1,S3,P1","http://www.cgi-resources.com");
-
secondGroup[1][3][2]=new Option("M1,S3,P2","http://adashimar.hypermart.net/");
-
-
secondGroup[2][0][0]=new Option("---Select 3---"," ");
-
secondGroup[2][1][0]=new Option("Now Select This One"," ");
-
secondGroup[2][1][1]=new Option
-
("M2,S1,P1","http://www.cnn.com");
-
secondGroup[2][1][2]=new Option("M2,S1,P2","http://www.msnbc.com");
-
secondGroup[2][1][3]=new Option("M2,S1,P3","http://www.abcnews.com");
-
-
secondGroup[2][2][0]=new Option("Now Select A Page"," ");
-
secondGroup[2][2][1]=new Option("M2,S2,P1","http://www.news.com");
-
secondGroup[2][2][2]=new Option("M2,S2,P2","http://www.wired.com");
-
-
secondGroup[2][3][0]=new Option("Now Select A Page"," ");
-
secondGroup[2][3][1]=new Option
-
("M2,S3,P1","http://www.jdstiles.com");
-
secondGroup[2][3][2]=new Option
-
("M2,S3,P2","http://jdstiles.com/index1.html");
-
secondGroup[2][3][3]=new Option
-
("M2,S3,P3","http://jdstiles.com/index2.html");
-
secondGroup[2][3][4]=new Option("M2,S3,P4","http://jdstiles.com/index3.html");
-
-
-
var temp1=document.isc.stage3
-
function redirect1(y){
-
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
-
}
-
-
function redirect2(z){
-
window.location=temp1[z].value
-
}
[HTML]
//--></script>
</td></tr></table></FORM></center>
</body>[/HTML]
1 2323 acoder 16,027
Recognized Expert Moderator MVP
You just need to change the redirect2 function to display by e.g. elem.innerHTML = whatever, instead of setting window.location .
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Simon Bunker |
last post by:
I was just wondering why python doesn't make a distinction between single
and double
quotes - a bit like Perl does.
Obviously I realise there are no dollar signs so you can't intrpolate a
varaible in a string.
This is fine, but having to remember to put an r in front of regex's is
really annoying and it would
be great if you could jsut use single quotes instead to interpolate slashes
properly etc. (ie only escape them once).
|
by: Danny Woolston |
last post by:
Hi
I have a double that i want to round to a certain number of decimal places
this is the code i use
Return Math.Round(mdNumber, mbDecimalPlaces)
mbDecimalPlaces is the number of decimal places that i want, but it doesn't
use them with two decimal places i still get 0.0 or 9.9
|
by: Suzanne Vogel |
last post by:
I'd like to convert a double to a binary representation. I can use the
"&" bit operation with a bit mask to convert *non* float types to binary
representations, but I can't use "&" on doubles.
To get around this limitation on double, I'd like to keep the bits of
the double the *same* but change its interpretation to long. I can use
"&" on longs. I tried to use reinterpret_cast for this purpose, but it
returned zero every time.
double...
|
by: Dalan |
last post by:
I probably just need a simple piece of code to do this as the couple
tried so far have failed. I created a new Access 97 Form Filter
(frmFilterForm) which displays most of the key data fields from the
main form (frmMain) records. What I'm trying to do is simply double
click on an autonumber ID column record in frmFilterForm and have it
to open the related record in frmMain for updates. Any assistance will
be appreciated. Thanks.
|
by: Fred Ma |
last post by:
I'm using the expression "int a = ceil( SomeDouble )".
The man page says that ceil returns the smallest
integer that is not less than SomeDouble, represented
as a double. However, my understanding is that a
double has nonuniform precision throughout its value
range. Will a double always be able to exactly
represent any value of type int? Could someone please
point me to an explanation of how this is ensured,
given that the details of...
| |
by: Alex K. |
last post by:
I am using combo box with DropDownStyle = simple.
Tried to use double click event but it does not work.
I've got
this.comboItems.DoubleClick += new
System.EventHandler(this.comboItems_DoubleClick);
....
private void comboItems_DoubleClick(object sender, System.EventArgs e)
{
|
by: Martin Jĝrgensen |
last post by:
Hi,
Short question:
Any particular reason for why I'm getting a warning here:
(cast from function call of type int to non-matching type double)
xdouble = (double)rand()/(double)RAND_MAX;
|
by: Armando |
last post by:
I have an app (A2000) where I am letting the user move an object on the
screen. I use the OnClick for a command button event to modify the object's
Top (or Left) properties, but you can only click slowly. That is, every
other click is ignored, because Access is seeing a double click event. I
would put the same code there, except I'm also using the SHIFT key (during
mouse click) to cause bigger moves, and there's no SHIFT flag for the...
|
by: xdevel |
last post by:
Hi, if I have:
int a=100, b = 200, c = 300;
int *a = {&a, &b, &c};
than say that:
int **b is equal to int *a is correct????
|
by: ssoffline |
last post by:
hi
i have an app in which i can drop objects onto a form and move them, it
consists of graphics (lines), i am using double buffering to avoid
filckering in the parent control which is a panel,but when i add
controls to this panel dyanamically, the double buffering effect is not
there, i move all lines connceted to a control when the control is
moved , at this time flickering occurs,also when i enable double
buffering for a child control...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |