continued from an older thread
[QUOTE=tacodomains;4846795]Here’s an example I just wrote that should accomplish what you are trying to do. I picked up a function already available for setting the dropdown box value but had to modify it to use the form name. I tested this in IE8. Paste this code into a file and save as .html and you can then point to it in your browser to test:
<html>
<head>
<script language="javascript">
function changevalue(obj)
{
Select_Value_Set("cboDropdown","frmMain",obj.value);
}
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Francis Cocharrua :: http://scripts.franciscocharrua.com/ */
function Select_Value_Set(SelectName,FormName,Value) {
eval('SelectObject = document.' + FormName + '.' + SelectName + ';');
for(index = 0;
index < SelectObject.length;
index++) {
if(SelectObject[index].value == Value)
SelectObject.selectedIndex = index;
}
}
</script>
</head>
<body>
<img value="choice1" onclick="changevalue(this);" />
<img value="choice2" onclick="changevalue(this);" />
<form name="frmMain">
<select name="cboDropdown">
<option value="choice1">Choice1</option>
<option value="choice2">Choice2</option>
</select>
</form>
</body>
</html>
If you have any questions let me know.[/QUOTE]
Hi tacodomains,
How would you go about coding this if say, you had the drop down on one page and the images on another?