I have a form where I have a list box with all the counties of a state and a link (a map image). On clicking the map opens the map in a popup window.
Upto this I am fine. On clicking one of the counties in the map should highlight the same county in the list box. I am having problems with this.
Please somebody help!!!!!
greygirl
This is part of my code.
javascript code in Original Window:
<script>
function newWindow()
{
mywindow = open('map.htm', 'myname', 'resizable=no, width=400, height=500');
mywindow.location.href = 'map.htm';
if(mywindow.opener == null) mywindow.opener=self;
}
function restart() {
document.mainForm.areaname.options.selectedIndex = mywindow.
mywindow.close();
}
</script>
javascript code in map.htm:
<script>
function copyItem(countyVal)
{
for (var oi=0;oi < opener.mainForm.areaname.options.length;oi++)
{
if (countyVal == opener.mainForm.areaname.options[oi].value)
{
opener.mainForm.areaname.options.selectedIndex == countyVal;
}
}
}
</script>
Upto this I am fine. On clicking one of the counties in the map should highlight the same county in the list box. I am having problems with this.
Please somebody help!!!!!
greygirl
This is part of my code.
javascript code in Original Window:
<script>
function newWindow()
{
mywindow = open('map.htm', 'myname', 'resizable=no, width=400, height=500');
mywindow.location.href = 'map.htm';
if(mywindow.opener == null) mywindow.opener=self;
}
function restart() {
document.mainForm.areaname.options.selectedIndex = mywindow.
mywindow.close();
}
</script>
javascript code in map.htm:
<script>
function copyItem(countyVal)
{
for (var oi=0;oi < opener.mainForm.areaname.options.length;oi++)
{
if (countyVal == opener.mainForm.areaname.options[oi].value)
{
opener.mainForm.areaname.options.selectedIndex == countyVal;
}
}
}
</script>