I have worked with the script and it still does not work.
Unfortunately, I can not get this to work. I know what I would like
to have happen, which to have the value in "strdiv" into the SQL statement.
I can read the DivisionID value which I am passing with the javascript, but
do not understand how to get that value into the SQL.
AND then, when the user changes the DivisionName have the javascript update "strdiv" with the new DivisionID value.
This is not I have my web layed out from top to bottom.
All suggestions toward getting this thing to work is appreciated.
Thank you.
Gail
SELECT SectionUnit.*, Division.DivID
FROM Division INNER JOIN SectionUnit ON Division.DivID = SectionUnit.DivisionID
WHERE Division.DivID LIKE "the value of strdiv needs to go here";
Set RS2 = cnnSearch.Execute(SectionSQL)
<script language="javascript">
<!--
var strdiv
strdiv = document.Listing.CorrectDivisionName.options[document.Listing.CorrectDivisionName.selectedIndex].value;
alert(strdiv)
//-->
</script>
</font>
</td>
<td bordercolor="#990066" valign="top" height="18" bgcolor="#DFF4FF" colspan="2">
<font color="#FFFF00">
<select name=CorrectSectionName">
<% While Not RS2.EOF %>
<% If Trim(Session("SectionUnitName") = Trim(RS2.Fields("SectionUnitName") Then %>
<option value="<%=RS2.Fields("DivisionID"%>" SELECTED><%=RS2.Fields("SectionUnitName"%></option>
<% Else %>
<option value="<%=RS2.Fields("DivisionID"%>"><%=RS2.Fields("SectionUnitName"%></option>
<% End If %>
<% RS2.MoveNext
Wend
%>
</select>
PLEASE help.
Unfortunately, I can not get this to work. I know what I would like
to have happen, which to have the value in "strdiv" into the SQL statement.
I can read the DivisionID value which I am passing with the javascript, but
do not understand how to get that value into the SQL.
AND then, when the user changes the DivisionName have the javascript update "strdiv" with the new DivisionID value.
This is not I have my web layed out from top to bottom.
All suggestions toward getting this thing to work is appreciated.
Thank you.
Gail
SELECT SectionUnit.*, Division.DivID
FROM Division INNER JOIN SectionUnit ON Division.DivID = SectionUnit.DivisionID
WHERE Division.DivID LIKE "the value of strdiv needs to go here";
Set RS2 = cnnSearch.Execute(SectionSQL)
<script language="javascript">
<!--
var strdiv
strdiv = document.Listing.CorrectDivisionName.options[document.Listing.CorrectDivisionName.selectedIndex].value;
alert(strdiv)
//-->
</script>
</font>
</td>
<td bordercolor="#990066" valign="top" height="18" bgcolor="#DFF4FF" colspan="2">
<font color="#FFFF00">
<select name=CorrectSectionName">
<% While Not RS2.EOF %>
<% If Trim(Session("SectionUnitName") = Trim(RS2.Fields("SectionUnitName") Then %>
<option value="<%=RS2.Fields("DivisionID"%>" SELECTED><%=RS2.Fields("SectionUnitName"%></option>
<% Else %>
<option value="<%=RS2.Fields("DivisionID"%>"><%=RS2.Fields("SectionUnitName"%></option>
<% End If %>
<% RS2.MoveNext
Wend
%>
</select>
PLEASE help.