Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't select list option in IE7

Status
Not open for further replies.

jenip

Programmer
Jan 10, 2003
5
0
0
US
Simple asp code to select Month and Year, works in IE6. In IE7 after selecting Month, you cannot select from the Year list. This is a popup form, and the workaround is to click outside the popup form, then select year.
Code:
<%@ LANGUAGE="VBSCRIPT" %> 
<% 
'*  PopUp Window for selecting Month
'*********************** 
dim strKeep
If Request.Querystring("Page") <> "" Then 
   PageName = Request.Querystring("Page") 
   Session("PageName") = PageName 
Else 
   PageName = Session("PageName") 
End If 
If Request.Querystring("Form") <> "" Then 
   FormName = Request.Querystring("Form") 
   Session("FormName") = FormName 
Else 
   FormName = Session("FormName") 
End If 
If Request.Querystring("Element") <> "" Then 
   ElementName = Request.Querystring("Element") 
   Session("ElementName") = ElementName 
Else 
   ElementName = Session("ElementName") 
End If 	
%> 
<HTML> 
<HEAD> 
<TITLE>Select Month</TITLE> 
<SCRIPT LANGUAGE="javascript"> 
  function cmdCont() {
	frmMthSel.txtMonth.value+= frmMthSel.cboMonth.options[frmMthSel.cboMonth.selectedIndex].value;
	frmMthSel.txtMonth.value+= ", " + frmMthSel.cboYear.options[frmMthSel.cboYear.selectedIndex].value;
        MonthPop()  
				}				

   function MonthPop() { 
	   window.opener.<%=formname & "." & elementname%>.value = frmMthSel.txtMonth.value ; 
	      self.close() 
      } 
</SCRIPT> 
</HEAD> 
<BODY BGColor="Lavender" alink="#526B84" vlink="Black" onBlur="javascript:self . focus ();"> 

<form name="frmMthSel" action="month_Select.asp?" method="POST">

<% 
If IsDate(Request.QueryString("Date")) Then 
	BuildDate=Request.QueryString("Date") 
End If 
%>
	<center>
		<table border="0" cellspacing="0" cellpadding="2" width="80%" ID="Table2" height="300">
	<TR>
				<TD  colspan = 3 align="right" class="header"><P align="center"><FONT face="Arial" size="5"><STRONG>Select a Year</STRONG></FONT></P>				</TD>
			</TR>
			<TR>
					<td></td>
					<td align="Right"><INPUT  type="submit" name="Continue" value="Continue" ID="Submit4" onclick="cmdCont()"></TD>
			</TR>
			<TR>
				<TR>
					<TD class="header" align="left" colSpan="2" height="41">
						<FONT face="Arial" size="3">Through Month Of:</FONT>
					</TD>
				</TR>
				<tr>
					<td align="right" >
						<strong>
							<select id="cboMonth" name="MonthList" size="12">
								<option selected value="01 (January)">January
								</option>
								<option value="02 (February)">February
								</option>
								<option value="03 (March)">March
								</option>
								<option value="04 (April)">April
								</option>
								<option value="05 (May)">May
								</option>
								<option value="06 (June)">June
								</option>
								<option value="07 (July)">July
								</option>
								<option value="08 (August)">August
								</option>
								<option value="09 (September)">September
								</option>
								<option value="10 (October)">October
								</option>
								<option value="11 (November)">November
								</option>
								<option value="12 (December)">December
								</option>
							</select>
						</strong>
					</td>
					<td align="right" ><strong>
						    <select id="cboYear" name="YearList" size="5">
             			      <option selected value="<%= year(now())%>"> <% = year(now())%> </option>
						      <option value="<%= year(now()) - 1%>"> <% = year(now()) - 1%> </option>
						      <option value="<%= year(now()) - 2%>"> <% = year(now()) - 2%> </option>
				      		  <option value="<%= year(now()) - 3%>"> <% = year(now()) - 3%> </option>
				              <option value="<%= year(now()) - 4%>"> <% = year(now()) - 4%> </option>
 						    </select> </strong>
					</td>
				</tr>
				<tr>
					<td align="left"><INPUT id="txtMonth" type="hidden" value="<%=strKeep%>" name="txtKeep"></td>						
				</tr>
	</table>
</center> 
</form>
</BODY> 
</HTML>

 
If it's a difference from IE6 to IE7 it's most likely a JavaScript issue. Maybe try the JavaScript forum.

~Ben
"Insert witty statement here
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top