Hi,
I have two dropdowns when a value is selected in one i want to set the value of another. The code i am using gets the value of the first but won't populate and no error!
Thanks for any help.
Here is the Javascript
Here is a striped out version of the page that can be saved as a .html file and tested
I have two dropdowns when a value is selected in one i want to set the value of another. The code i am using gets the value of the first but won't populate and no error!
Thanks for any help.
Here is the Javascript
Code:
function function1(Call_Result) {
var result = (Call_Result.options[Call_Result.selectedIndex].value);
if (result == "Hoax") {
//alert("hoax");
document.forms[0].[_recordmanager.selectedIndex].value = "user2";
return false;
//document.forms[0].[_recordmanager.selectedIndex].value = "";
}
//alert("SelectedIndex value = "+result);
}
Here is a striped out version of the page that can be saved as a .html file and tested
Code:
<html>
<head></head>
<body>
<tr><td class=ContactBoldText>Call Result </td>
<script language="Javascript">
function function1(Call_Result) {
var result = (Call_Result.options[Call_Result.selectedIndex].value);
if (result == "Hoax") {
alert("hoax");
_recordmanager.options[_recordmanager.selectedIndex].value = "user2";
}
}
</script>
<td class=ContactBoldText>
<select name=_Call_Result" onChange="function1(this);">
<option value="" selected></option>
<option value="Hoax" selected>Hoax</option>
<option value="Not Interested">Not Interested</option>
<option value="No Answer">No Answer</option>
<option value="Booking">Booking</option>
</select>
</td></tr>
<tr><td class=ContactBoldText>Record Manager </td>
<td class=ContactBoldText><select name="_recordmanager" id=rmanager class=ContactsmallTextField format=RecordManager>
<option noval="Administrator" value="czp19of2qr92rov9">Administrator</option>
<option noval="Michael RutherFord" value="czp19of2qr68rtv9">Michael RutherFord</option>
<option noval="sales" value="2aq17i72uydbk991">sales</option>
<option noval="user1" selected value="f1q12ua3isgdhxn8">user1</option>
<option noval="user10" value="k1q1q8l2a4eevqzg">user10</option>
<option noval="user11" value="k1q149l2g8d5zlug">user11</option>
<option noval="user12" value="k1q1lal29e04mc0b">user12</option>
<option noval="user13" value="k1q1wal24m178db4">user13</option>
<option noval="user14" value="k1q1abl2r803a937">user14</option>
<option noval="user15" value="k1q1hdl288fjy1v2">user15</option>
<option noval="user16" value="k1q1sdl2dbfi02wh">user16</option>
<option noval="user17" value="k1q16el2dh16voyi">user17</option>
<option noval="user18" value="k1q1oel2y0q9cheg">user18</option>
<option noval="user19" value="42q1fx73uq2in6be">user19</option>
<option noval="user2" value="k1q140l2gd3lurmg">user2</option>
<option noval="user20" value="k1q1kgl2yaef6f64">user20</option>
<option noval="user3" value="k1q1h3l2p2160fya">user3</option>
<option noval="user4" value="k1q1z4l2boo5ghvb">user4</option>
<option noval="user5" value="k1q1e5l2ylpbq87l">user5</option>
<option noval="user6" value="k1q1v5l2vlo48ea9">user6</option>
<option noval="user7" value="k1q166l2hzc5x0h8">user7</option>
<option noval="user8" value="k1q1s7l2023avnad">user8</option>
<option noval="user9" value="k1q1c8l2jw1cuv96">user9</option>
</select>
</td></tr>
</body>
</html>