Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to add an url 1

Status
Not open for further replies.

overyde

Programmer
May 27, 2003
226
0
0
ZA
Hi,
I don't really deal with javascript a lot and I need a little help. I have three dropdown boxes. When you select an option in the first dropdown box the value in the second dropdown box changes relatively. The third drop down box works similarly. My client wants the third box to be the hyperlink. (i.e. once they have chosen the value in the third box they can then click on a "submit" button and be taken to that page)

I will enclose the code hereafter.(Sorry it is pretty long but I really don't deal with this often)

<html>
<head>
<link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;1.css&quot;>
<title>
Papersmith & Son
</title>
<script>
<!--
function clearTextBox()
{
document.frmPS.q.value = '';
}

function b(selection)
{

clearTextBox()

//clear 2nd select list
var noOptions = document.frmPS.selType.length;
do
{
document.frmPS.selType.options[noOptions] = null;
noOptions--;
}
while (noOptions >= 2);


//clear 3rd select list
var noOptions1 = document.frmPS.selPaper.length;
if(noOptions1 > 1)
{
do
{
document.frmPS.selPaper.options[noOptions1] = null;
noOptions1--;
}
while (noOptions1 >= 2);
}


if(selection == 'coated')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Matt','matt');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Silk(semi-matt)','silk');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Gloss','gloss');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Cast Coated','castcoated');
}
else if(selection == 'handmade')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('River Reed','riverreed');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Deerfield','deerfield');
}
else if(selection == 'office')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Laser','laser');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Inkjet','inkjet');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Transfer(Textile)','transfertextile');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Photo Realistic','photorealistic');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Photo (Weather Resistant)','photoweares');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Rainbow Bright','rainbow');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Pastels','pastels');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Transparencies','trans');
}
else if(selection == 'plastics')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Polypropylene','polyprop');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Rigid PVC','rigidpvc');
}
else if(selection == 'self')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Paper','selfpaper');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Vinyl','selfvinyl');
}
else if(selection == 'text')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Smooth & Toothy','smoothtoothy');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Fibre Added','fibre');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Textured','textured');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Metallics','metallics');
}
else if(selection == 'translucent')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Plain','transplain');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Coloured','transcoloured');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Textured','transtextured');
}





}

function c(selectx)
{

clearTextBox()

//clear 3rd select list
var noOptions1 = document.frmPS.selPaper.length;
if(noOptions1 > 1)
{
do
{
document.frmPS.selPaper.options[noOptions1] = null;
noOptions1--;
}
while (noOptions1 >= 2);
}


if(selectx == 'matt')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Parilux White','pariluxwhite');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Parilux Cream','pariluxcream');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('PhoeniXmotion Xenon','phoenixxen');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('PhoeniXmotion Xantur','phoenixxan');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('PhoeniXmotion Xantic','phoenixxantic');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('PhoeniXmotion Xyrrus','phoenixxyr');
}
else if(selectx== 'silk')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Creator Silk White','creatsilkwhite');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Phoenix Imperial White','phoenixmpwhite');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Phoenix Imperial Ivory','phoeniximpivo');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('PhoenoMatt White','phoenomattwhite');
}
else if(selectx== 'gloss')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Creator Gloss White','creatglosswhite');
}
else if(selectx== 'castcoated')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('VeniceLux','venicelux');
}
else if(selectx== 'riverreed')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Cream','rivercream');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Ivory','riverivory');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Sand','riversand');
}
else if(selectx== 'deerfield')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Deerfield','deerfield2');
}
else if(selectx== 'laser')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Laser','laser2');
}
else if(selectx== 'inkjet')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Inkjet','inkjet2');
}
else if(selectx== 'transfertextile')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Transfer (Textile)','transfertextile2');
}
else if(selectx== 'photorealistic')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Photo Realistic','photorealistic2');
}
else if(selectx== 'photoweares')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Photo (Weather Resistant)','photoweares2');
}
else if(selectx== 'rainbow')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Rainbow Bright','rainbow2');
}
else if(selectx== 'pastels')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Pastels','pastels2');
}
else if(selectx== 'trans')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Transparencies','trans2');
}
else if(selectx== 'polyprop')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Priplak','priplak');
}
else if(selectx== 'rigidpvc')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('None Available Yet','');
}
else if(selectx== 'selfpaper')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Soria (Matt Uncoated)','soria');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Duero (Semi-Gloss)','Duero');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Alto Brillo (High Gloss Coated)','alto');
}
else if(selectx== 'selfvinyl')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Undergoing Trials','');
}
else if(selectx== 'smoothtoothy')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Ambassador Wove','ambwove');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Biotop 3','biotop3');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Cranes Crest','cranes');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Cyberstar','cyber');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Deep Black','deepblack');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Eureka Wove','eureka');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Luxboard','luxboard');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Superwove','superwove');
}
else if(selectx== 'fibre')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Bier Paper','bier');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Flannel','flannel');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Stroh','stroh');
}
else if(selectx== 'textured')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Ambassador Laid','amblaid');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Ambassador Profile','ambprofile');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Brightwater','brightwater');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Eureka Laid','eurlaid');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Felt','felt');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Groove Too','groovetoo');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Groove III','grooveiii');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Kendall Cover - Antelope','kendallant');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Kendall Cover - Cord','kendallcord');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Luxboard Linen','luxlinen');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Saltire','saltire');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Scotia Original','scotiaOrig');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Scotia Weave','scotiaweave');
}
else if(selectx== 'metallics')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Stardream','stardream');
}
else if(selectx== 'transplain')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Gateway Tracing','gateway');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Virtual Parchment','virtual');
}
else if(selectx== 'transcoloured')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Xpose','xpose');
}
else if(selectx== 'transtextured')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Brightwater Rib Translucent','brightwaterrib');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Scotia Original Translucent','scotorigtrans');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Scotia Weave Translucent','scotweavetrans');
}
}

function d(blah)
{
if(blah == 'great')
{
document.frmPS.q.value='details1 details1 1111111111111111111111111111111'
}
else if(blah == '33')
{
document.frmPS.q.value='details2 details2 222222222222222222222222222222222'
}
}
-->
</script>

</head>

<body background=&quot;./images/bg2.gif&quot; style=&quot; background-repeat: repeat-selCat; &quot;>
<img src=&quot;./images/f.gif&quot; style=&quot; position:absolute; top:0px; left:0px; &quot; selPaperidth=&quot;148&quot; height=&quot;53&quot;>
<table class=&quot;toptable&quot;>
<tr>
<td><a href=&quot;products.htm&quot; class=&quot;topmenu&quot;>Products</a></td><td><font color=&quot;#036A6D&quot;>|</font></td>
<td><a href=&quot;services.htm&quot; class=&quot;topmenu&quot;>Services</a></td><td><font color=&quot;#036A6D&quot;>|</font></td>
<td><a href=&quot;wwa.htm&quot; class=&quot;topmenu&quot;>Who We Are</a></td><td><font color=&quot;#036A6D&quot;>|</font></td>
<td><a href=&quot;pshop.htm&quot; class=&quot;topmenu&quot;>Paper Shop</a></td><td><font color=&quot;#036A6D&quot;>|</font></td>
<td><a href=&quot;pdes.htm&quot; class=&quot;topmenu&quot;>Paper and Design</a></td><td><font color=&quot;#036A6D&quot;>|</font></td>
<td><a href=&quot;tgui.htm&quot; class=&quot;topmenu&quot;>Technical Guide</a></td>
</tr>
</table>
<img class=&quot;pageline1&quot; src=&quot;./images/line1.gif&quot;>
<img class=&quot;pageline2&quot; src=&quot;./images/line2.gif&quot;>
<img class=&quot;pageheading&quot; src=&quot;./images/productslogo.gif&quot;>

<table class=&quot;pagemenutablelevel2&quot; size=&quot;600px&quot; cellpadding=&quot;5&quot;>
<tr>
<td><a class=&quot;pagemenulevel2&quot; href=&quot;techspec.htm&quot;>Technical Specifications</a></td>
</tr>
</table>

<img src=&quot;./images/paperselector.gif&quot; style=&quot;position: absolute; left: 598; top: 72&quot; selPaperidth=&quot;129&quot; height=&quot;33&quot;>

<form name=&quot;frmPS&quot; style=&quot; position:absolute; left:154px; top:120px; &quot;>
<table>
<tr>
<td>
<font face=&quot;verdana&quot; color=&quot;#037774&quot; size=&quot;-2&quot;><b>Product Category</b></font><br>
<select class=&quot;paperSelectorSelectBox&quot; name=&quot;selCat&quot; onchange=&quot;b(document.frmPS.selCat.value);&quot;>
<option value=&quot;&quot;>Select product category</option>
<option value=&quot;&quot;>_____________________</option>
<option value=&quot;coated&quot;>Coated</option>
<option value=&quot;handmade&quot;>Handmade</option>
<option value=&quot;office&quot;>Office</option>
<option value=&quot;plastics&quot;>Plastics</option>
<option value=&quot;self&quot;>Self-Adhesive</option>
<option value=&quot;text&quot;>Text and Cover</option>
<option value=&quot;translucent&quot;>Translucent</option>
</select>
</td>
<td>
<font face=&quot;verdana&quot; color=&quot;#037774&quot; size=&quot;-2&quot;><b>Product Type</b></font><br>
<select class=&quot;paperSelectorSelectBox&quot; name=&quot;selType&quot; onchange=&quot;c(document.frmPS.selType.value);&quot;>
<option value=&quot;&quot;>Select product type</option>
<option value=&quot;&quot;>_____________________</option>
</select>
</td>
<td>
<font face=&quot;verdana&quot; color=&quot;#037774&quot; size=&quot;-2&quot;><b>Paper Type</b></font><br>
<select class=&quot;paperSelectorSelectBox&quot; name=&quot;selPaper&quot; onchange=&quot;d(document.frmPS.selPaper.value);&quot;>
<option value=&quot;&quot;>Select paper type</option>
<option value=&quot;&quot;>_____________________</option>
</select>
</td>
</table>


<input type=&quot;text&quot; name=&quot;q&quot; size=&quot;250&quot; style=&quot; position:absolute; border:none; &quot; value=&quot;...working shortly&quot;>

</form>

</body>
</html>

Reality is built on a foundation of dreams.
 
Hope that this solves ure problem

<html>
<head>
<link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;1.css&quot;>
<title>
Papersmith & Son
</title>
<script>
<!--
function clearTextBox(intVal)
{
// if intVal == 1 then hide the button
if(intVal==1){
document.frmPS.q.style.display = &quot;none&quot;;
}
else{
document.frmPS.q.style.display = &quot;inline&quot;;
}

}

function b(selection)
{


clearTextBox(1)
document.frmPS.selPaper.options[0].selected=true;
document.frmPS.selType.options[0].selected=true;

//clear 2nd select list
var noOptions = document.frmPS.selType.length;
do
{
document.frmPS.selType.options[noOptions] = null;
noOptions--;
}
while (noOptions >= 2);


//clear 3rd select list
var noOptions1 = document.frmPS.selPaper.length;
if(noOptions1 > 1)
{
do
{
document.frmPS.selPaper.options[noOptions1] = null;
noOptions1--;
}
while (noOptions1 >= 2);
}


if(selection == 'coated')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Matt','matt');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Silk(semi-matt)','silk');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Gloss','gloss');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Cast Coated','castcoated');
}
else if(selection == 'handmade')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('River Reed','riverreed');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Deerfield','deerfield');
}
else if(selection == 'office')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Laser','laser');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Inkjet','inkjet');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Transfer(Textile)','transfertextile');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Photo Realistic','photorealistic');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Photo (Weather Resistant)','photoweares');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Rainbow Bright','rainbow');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Pastels','pastels');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Transparencies','trans');
}
else if(selection == 'plastics')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Polypropylene','polyprop');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Rigid PVC','rigidpvc');
}
else if(selection == 'self')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Paper','selfpaper');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Vinyl','selfvinyl');
}
else if(selection == 'text')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Smooth & Toothy','smoothtoothy');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Fibre Added','fibre');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Textured','textured');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Metallics','metallics');
}
else if(selection == 'translucent')
{
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Plain','transplain');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Coloured','transcoloured');
document.frmPS.selType.options[document.frmPS.selType.options.length] = new Option('Textured','transtextured');
}





}

function c(selectx)
{

document.frmPS.selPaper.options[0].selected=true;
clearTextBox(1)

//clear 3rd select list
var noOptions1 = document.frmPS.selPaper.length;
if(noOptions1 > 1)
{
do
{
document.frmPS.selPaper.options[noOptions1] = null;
noOptions1--;
}
while (noOptions1 >= 2);
}


if(selectx == 'matt')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Parilux White','pariluxwhite');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Parilux Cream','pariluxcream');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('PhoeniXmotion Xenon','phoenixxen');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('PhoeniXmotion Xantur','phoenixxan');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('PhoeniXmotion Xantic','phoenixxantic');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('PhoeniXmotion Xyrrus','phoenixxyr');
}
else if(selectx== 'silk')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Creator Silk White','creatsilkwhite');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Phoenix Imperial White','phoenixmpwhite');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Phoenix Imperial Ivory','phoeniximpivo');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('PhoenoMatt White','phoenomattwhite');
}
else if(selectx== 'gloss')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Creator Gloss White','creatglosswhite');
}
else if(selectx== 'castcoated')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('VeniceLux','venicelux');
}
else if(selectx== 'riverreed')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Cream','rivercream');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Ivory','riverivory');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Sand','riversand');
}
else if(selectx== 'deerfield')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Deerfield','deerfield2');
}
else if(selectx== 'laser')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Laser','laser2');
}
else if(selectx== 'inkjet')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Inkjet','inkjet2');
}
else if(selectx== 'transfertextile')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Transfer (Textile)','transfertextile2');
}
else if(selectx== 'photorealistic')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Photo Realistic','photorealistic2');
}
else if(selectx== 'photoweares')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Photo (Weather Resistant)','photoweares2');
}
else if(selectx== 'rainbow')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Rainbow Bright','rainbow2');
}
else if(selectx== 'pastels')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Pastels','pastels2');
}
else if(selectx== 'trans')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Transparencies','trans2');
}
else if(selectx== 'polyprop')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Priplak','priplak');
}
else if(selectx== 'rigidpvc')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('None Available Yet','');
}
else if(selectx== 'selfpaper')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Soria (Matt Uncoated)','soria');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Duero (Semi-Gloss)','Duero');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Alto Brillo (High Gloss Coated)','alto');
}
else if(selectx== 'selfvinyl')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Undergoing Trials','');
}
else if(selectx== 'smoothtoothy')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Ambassador Wove','ambwove');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Biotop 3','biotop3');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Cranes Crest','cranes');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Cyberstar','cyber');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Deep Black','deepblack');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Eureka Wove','eureka');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Luxboard','luxboard');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Superwove','superwove');
}
else if(selectx== 'fibre')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Bier Paper','bier');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Flannel','flannel');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Stroh','stroh');
}
else if(selectx== 'textured')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Ambassador Laid','amblaid');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Ambassador Profile','ambprofile');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Brightwater','brightwater');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Eureka Laid','eurlaid');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Felt','felt');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Groove Too','groovetoo');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Groove III','grooveiii');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Kendall Cover - Antelope','kendallant');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Kendall Cover - Cord','kendallcord');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Luxboard Linen','luxlinen');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Saltire','saltire');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Scotia Original','scotiaOrig');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Scotia Weave','scotiaweave');
}
else if(selectx== 'metallics')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Stardream','stardream');
}
else if(selectx== 'transplain')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Gateway Tracing','gateway');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Virtual Parchment','virtual');
}
else if(selectx== 'transcoloured')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Xpose','xpose');
}
else if(selectx== 'transtextured')
{
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Brightwater Rib Translucent','brightwaterrib');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Scotia Original Translucent','scotorigtrans');
document.frmPS.selPaper.options[document.frmPS.selPaper.options.length] = new Option('Scotia Weave Translucent','scotweavetrans');
}
}

function d(blah)
{

if(document.frmPS.selPaper.value!=&quot;&quot;){
clearTextBox(0)
}
else{
clearTextBox(1)
return;
}
if(blah == 'great')
{
document.frmPS.q.value='details1 details1 1111111111111111111111111111111'
}
else if(blah == '33')
{
document.frmPS.q.value='details2 details2 222222222222222222222222222222222'
}
}

function funcSubmit(){
alert(&quot;Enter the hyperlink here.&quot;);
}
-->
</script>

</head>

<body background=&quot;./images/bg2.gif&quot; style=&quot; background-repeat: repeat-selCat; &quot;>
<img src=&quot;./images/f.gif&quot; style=&quot; position:absolute; top:0px; left:0px; &quot; selPaperidth=&quot;148&quot; height=&quot;53&quot;>
<table class=&quot;toptable&quot;>
<tr>
<td><a href=&quot;products.htm&quot; class=&quot;topmenu&quot;>Products</a></td><td><font color=&quot;#036A6D&quot;>|</font></td>
<td><a href=&quot;services.htm&quot; class=&quot;topmenu&quot;>Services</a></td><td><font color=&quot;#036A6D&quot;>|</font></td>
<td><a href=&quot;wwa.htm&quot; class=&quot;topmenu&quot;>Who We Are</a></td><td><font color=&quot;#036A6D&quot;>|</font></td>
<td><a href=&quot;pshop.htm&quot; class=&quot;topmenu&quot;>Paper Shop</a></td><td><font color=&quot;#036A6D&quot;>|</font></td>
<td><a href=&quot;pdes.htm&quot; class=&quot;topmenu&quot;>Paper and Design</a></td><td><font color=&quot;#036A6D&quot;>|</font></td>
<td><a href=&quot;tgui.htm&quot; class=&quot;topmenu&quot;>Technical Guide</a></td>
</tr>
</table>
<img class=&quot;pageline1&quot; src=&quot;./images/line1.gif&quot;>
<img class=&quot;pageline2&quot; src=&quot;./images/line2.gif&quot;>
<img class=&quot;pageheading&quot; src=&quot;./images/productslogo.gif&quot;>

<table class=&quot;pagemenutablelevel2&quot; size=&quot;600px&quot; cellpadding=&quot;5&quot;>
<tr>
<td><a class=&quot;pagemenulevel2&quot; href=&quot;techspec.htm&quot;>Technical Specifications</a></td>
</tr>
</table>

<img src=&quot;./images/paperselector.gif&quot; style=&quot;position: absolute; left: 598; top: 72&quot; selPaperidth=&quot;129&quot; height=&quot;33&quot;>

<form name=&quot;frmPS&quot; style=&quot; position:absolute; left:154px; top:120px; &quot;>
<table>
<tr>
<td>
<font face=&quot;verdana&quot; color=&quot;#037774&quot; size=&quot;-2&quot;><b>Product Category</b></font><br>
<select class=&quot;paperSelectorSelectBox&quot; name=&quot;selCat&quot; onchange=&quot;b(document.frmPS.selCat.value);&quot;>
<option value=&quot;&quot;>Select product category</option>
<option value=&quot;&quot;>_____________________</option>
<option value=&quot;coated&quot;>Coated</option>
<option value=&quot;handmade&quot;>Handmade</option>
<option value=&quot;office&quot;>Office</option>
<option value=&quot;plastics&quot;>Plastics</option>
<option value=&quot;self&quot;>Self-Adhesive</option>
<option value=&quot;text&quot;>Text and Cover</option>
<option value=&quot;translucent&quot;>Translucent</option>
</select>
</td>
<td>
<font face=&quot;verdana&quot; color=&quot;#037774&quot; size=&quot;-2&quot;><b>Product Type</b></font><br>
<select class=&quot;paperSelectorSelectBox&quot; name=&quot;selType&quot; onchange=&quot;c(document.frmPS.selType.value);&quot;>
<option value=&quot;&quot;>Select product type</option>
<option value=&quot;&quot;>_____________________</option>
</select>
</td>
<td>
<font face=&quot;verdana&quot; color=&quot;#037774&quot; size=&quot;-2&quot;><b>Paper Type</b></font><br>
<select class=&quot;paperSelectorSelectBox&quot; name=&quot;selPaper&quot; onchange=&quot;d(document.frmPS.selPaper.value);&quot;>
<option value=&quot;&quot;>Select paper type</option>
<option value=&quot;&quot;>_____________________</option>
</select>
</td>
</table>

<input type=&quot;button&quot; style=&quot;display:none&quot;name=&quot;q&quot; size=&quot;250&quot; style=&quot; position:absolute; border:none; &quot; value=&quot;submit&quot; onclick=&quot;funcSubmit()&quot;>

</form>

</body>
</html>




ciau
Faadiel
 
Thats really cool but where exactly do I insert the hyperlinks?

Reality is built on a foundation of dreams.
 
what are the hyperlinks and are they dependant on the &quot;Product Type&quot;
 
They are dependent on the product type. I found a solution as follows:

<HTML>
<HEAD>
<TITLE>Script</TITLE>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
v=false;
//-->
</SCRIPT>

<SCRIPT LANGUAGE=&quot;JavaScript1.1&quot;>
<!--
if (typeof(Option)+&quot;&quot; != &quot;undefined&quot;) v=true;
//-->
</SCRIPT>

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--//BEGIN Script

if(v){a=new Array(22);aln=22;}

function getFormNum (formName) {
formNum =-1;
for (i=0;i<document.forms.length;i++){
tempForm = document.forms;
if (formName == tempForm) {
formNum = i;
correctForm = tempForm;
break;
}
}
return formNum;
}

function jmp(formName,elementNum) {
getFormNum(formName);
if (formNum>=0) {
with (document.forms[formNum].elements[elementNum]) {
i=selectedIndex;
if (i>=0) location=options.value;
}
}
}

var catsIndex = -1;
var itemsIndex;
var subItemsIndex;
var fromRelate = 0; // a kludge flag used in relate to call relate2
// when true (1) relate2 is called from relate
// so bump up formNum so we refer to the first
// form, not the one before it (nonexistent)

function newCat(){
catsIndex++;
a[catsIndex] = new Array();
itemsIndex = -1;
}

function O(txt,url) {
itemsIndex++;
a[catsIndex][itemsIndex] = new Array();
a[catsIndex][itemsIndex].text = txt;
a[catsIndex][itemsIndex].value = url;
subItemsIndex = 0;
}

function OO(txt,url) {
a[catsIndex][itemsIndex][subItemsIndex] = new myOptions(txt,url);
subItemsIndex++;
}

function myOptions(txt,url){
this.text = txt;
this.value = url;
}

// fill array

newCat();

O(&quot;Topic 1a&quot;,&quot;link.html&quot;);
OO(&quot;Glossary&quot;,&quot;link.html&quot;);
OO(&quot;Lesson56&quot;,&quot;link.html&quot;);
OO(&quot;Lesson57&quot;,&quot;link.html&quot;);
OO(&quot;Lesson58&quot;,&quot;link.html&quot;);
OO(&quot;Lesson59&quot;,&quot;link.html&quot;);
O(&quot;Topic 1b&quot;,&quot;/dlab/&quot;);
OO(&quot;About&quot;,&quot;link.html&quot;);
OO(&quot;Books&quot;,&quot;link.html&quot;);
OO(&quot;Dessert Links&quot;,&quot;link.html&quot;);
OO(&quot;People Say&quot;,&quot;link.html&quot;);

newCat();
O(&quot;Topic 2a&quot;,&quot;link.html&quot;);
OO(&quot;Collections&quot;,&quot;link.html&quot;);
OO(&quot;Design&quot;,&quot;link.html&quot;);
OO(&quot;FAQs&quot;,&quot;link.html&quot;);
OO(&quot;Graphics&quot;,&quot;link.html&quot;);
OO(&quot;Languages&quot;,&quot;link.html&quot;);
OO(&quot;Organizations&quot;,&quot;link.html&quot;);
OO(&quot;Programming&quot;,&quot;link.html&quot;);
OO(&quot;Site Management&quot;,&quot;link.html&quot;);
OO(&quot;Style&quot;,&quot;link.html&quot;);
OO(&quot;Tutorials&quot;,&quot;link.html&quot;);
O(&quot;Topic 2b&quot;,&quot;/internet/&quot;);
OO(&quot;Collections&quot;,&quot;link.html&quot;);
OO(&quot;Conferences&quot;,&quot;link.html&quot;);
OO(&quot;Discussion&quot;,&quot;link.html&quot;);
OO(&quot;FAQs&quot;,&quot;link.html&quot;);
OO(&quot;Formats&quot;,&quot;link.html&quot;);
OO(&quot;Glossaries&quot;,&quot;link.html&quot;);
OO(&quot;History&quot;,&quot;link.html&quot;);
OO(&quot;Intranet&quot;,&quot;link.html&quot;);
OO(&quot;Jobs&quot;,&quot;link.html&quot;);

function relate(formName,elementNum,j) {
// relate first to second (and third) menus
// ie change first menu, changes second, then change third
//
if(v){
getFormNum(formName);
if (formNum>=0) {
formNum = formNum + 1; // reference next form, assume it follows in HTML
with (document.forms[formNum].elements[elementNum]) {
for(i=options.length-1;i>0;i--) options = null; // null out in reverse order (bug workarnd)
for(i=0;i<a[j].length;i++){
options = new Option(a[j].text,a[j].value);
}
options[0].selected = true;
}
// change third menu
fromRelate = 1;
relate2(formName,elementNum,0);
fromRelate = 0;
}
} else {
jmp(formName,elementNum);
}
}

function relate2(formName,elementNum,j) {
if(v){
getFormNum(formName);
if (formNum>=0) {
// find first menu's selection
// fromRelate means &quot;coming from relate function?&quot;
// then increment formNum so k refers to first form,
// not the nonexistent one before it (-1)
if (fromRelate) formNum++; // assumes forms follow each other
k = document.forms[formNum-1].elements[elementNum].selectedIndex;
formNum = formNum + 1; // reference next form, assume it follows in HTML
with (document.forms[formNum].elements[elementNum]) {
for(i=options.length-1;i>0;i--) options = null; // null out in reverse order (bug workarnd)
for(i=0;i<a[k][j].length;i++){
options = new Option(a[k][j].text,a[k][j].value);
}
options[0].selected = true;
}
}
} else {
jmp(formName,elementNum);
}
}

//-->
</SCRIPT>

</HEAD>


<BODY BGCOLOR=&quot;#ffffff&quot; link=&quot;#CC0033&quot; vlink=&quot;#333399&quot; alink=&quot;#FF0000&quot;>

<TABLE WIDTH=&quot;96%&quot; BORDER=&quot;0&quot; CELLSPACING=&quot;5&quot; CELLPADDING=&quot;5&quot;>
<TR><TD WIDTH=&quot;100%&quot;>
<FONT FACE=&quot;ARIAL,HELVETICA&quot; SIZE=&quot;-1&quot;>

<b>Menu Related Select Lists</B></FONT>
<P>
<CENTER>
<TABLE BGCOLOR=&quot;#DDCCFF&quot; BORDER=&quot;0&quot; CELLPADDING=&quot;8&quot; CELLSPACING=&quot;0&quot;>
<TR VALIGN=&quot;TOP&quot;>
<TD>Choose a subject:<BR>
<FORM NAME=&quot;f1&quot; METHOD=&quot;POST&quot; onSubmit=&quot;return false;&quot;>
<SELECT NAME=&quot;m1&quot; onChange=&quot;relate(this.form,0,this.selectedIndex)&quot;>
<OPTION VALUE=&quot;namenu.htm&quot;>Main A
<OPTION VALUE=&quot;namenu.htm&quot;>Main B
</SELECT>
<INPUT TYPE=SUBMIT VALUE=&quot;Go&quot; onClick=&quot;jmp(this.form,0);&quot;>
</FORM>
</TD>



<TD BGCOLOR=&quot;#FFFFFF&quot; VALIGN=MIDDLE><B>---></B></TD>
<TD>Choose a topic:<BR><FORM NAME=&quot;f2&quot; METHOD=&quot;POST&quot; onSubmit=&quot;return false;&quot;>
<SELECT NAME=&quot;m2&quot; onChange=&quot;relate2(this.form,0,this.selectedIndex)&quot;>
<OPTION VALUE=&quot;namenu.htm&quot;>Topic 1a
<OPTION VALUE=&quot;namenu.htm&quot;>Topic 1b
</SELECT>
<INPUT TYPE=SUBMIT VALUE=&quot;Go&quot; onClick=&quot;jmp(this.form,0);&quot;>
<INPUT TYPE=&quot;hidden&quot; NAME=&quot;baseurl&quot; VALUE=&quot;namenu.htm&quot;>
</FORM>
</TD>






<TD BGCOLOR=&quot;#FFFFFF&quot; VALIGN=MIDDLE><B>---></B></TD>
<TD>Choose a subtopic:<BR><FORM NAME=&quot;f3&quot; METHOD=&quot;POST&quot; ACTION=&quot;Hotscript&quot; onSubmit=&quot;return false;&quot;>
<SELECT NAME=&quot;m3&quot; onChange=&quot;jmp(this.form,0)&quot;>
<OPTION VALUE=&quot;namenu.htm&quot;>Glossary
<OPTION VALUE=&quot;namenu.htm&quot;>Lesson 56
<OPTION VALUE=&quot;namenu.htm&quot;>Lesson 57
<OPTION VALUE=&quot;namenu.htm&quot;>Lesson 58
<OPTION VALUE=&quot;namenu.htm&quot;>Lesson 59
</SELECT>
<INPUT TYPE=SUBMIT VALUE=&quot;Go&quot; onClick=&quot;jmp(this.form,0);&quot;>
<INPUT TYPE=&quot;hidden&quot; NAME=&quot;baseurl&quot; VALUE=&quot;namenu.htm&quot;>
</FORM>
</TD>

</TR>
</TABLE></CENTER>
</FONT>
</TD></TR>
</TABLE>
<center><font face=&quot;ms sans serif&quot; size=1> ¹Õè¤×͵ÑÇÍÂèÒ§·Ñé§ËÁ´·èÒ¹ÊÒÁÒöà»ÅÕè¹ÅÔ§¤ìà»ç¹¢Í§¤Ø³àͧ</font></center>

</BODY>
</HTML>

Reality is built on a foundation of dreams.
 
is the link for the current page, or is the link going to open in a new window...
 
current page, but I'll be using frames.

Reality is built on a foundation of dreams.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top