View Full Version : how to externally link javascript that has arrays

03-02-2009, 07:22 PM

I am using a double combox on my site. I need to externally link the javascript for it to work for my text/html DotNetNuke module application. I tried to externally link it, but it doesn't work. Any suggestions would be great.

<form name="doublecombo">
<TABLE cellSpacing=0 cellPadding=0 width="684" border=0 bgcolor="#ffffff">
<TD width="480" class="content">
<span class="subalt">GPS Mount Links</span><br />
Choose your device make then model. The results will show your device cradle and compatible mounting systems.
To build a complete mounting system add your cradle (RAM-HOL-XXX) and mounting system (RAM-B-XXX or RAP-B-XXX or RAP-SB-XXX).<br /><br />
<select name="example" onChange="redirect(this.options.selectedIndex)" style="WIDTH:230px; FONT-SIZE: 12px">
<option>CHOOSE GPS MAKE</option>
<br /><br />
<select name="stage2" style="WIDTH:230px; FONT-SIZE: 12px">
<input type="button" name="test" value="Go!" style="FONT-SIZE: 10px"

var groups=document.doublecombo.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()

group[0][0]=new Option()

group[1][0]=new Option("AV80R","pd2b.htm")

group[2][0]=new Option("ONIX400","bushnell_mounts.htm")
group[2][1]=new Option("ONIX400CR","bushnell_mounts.htm")

group[3][0]=new Option("EARTHMATE GPS PN-20","del1.htm")
group[3][1]=new Option("EARTHMATE GPS PN-40","del1.htm")

var temp=document.doublecombo.stage2

function redirect(x){
for (m=temp.options.length-1;m>0;m--)
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)

function go(){


<TD width="204" align="left" valign="middle"><img height=85 src="buildmount.gif" width=185 border=0 /></TD>
<TD colspan=2 height="15"></TD>
<TD colspan=2><iframe id="search" name="photos_frame" src="" width=684 height=1800 marginwidth=0 frameborder=0 scrolling=no></iframe></TD>