[Javascript] Problem with onBlur and dropdown lists - need help!!!

Guilherme Cordeiro guilhermecordeiro at yahoo.com.br
Thu Sep 23 13:31:58 CDT 2004


Hi, I created two HTML files, "main.html" and
"button.html":

main.html :

<HTML>
<HEAD>
<script language="JavaScript" type="text/javascript">
 function topwind()
 {
 
window.open('button.html','NewWin','toolbar=no,status=no,width=350,height=200')
 }
</script>
</HEAD>

<BODY>
 <a href="javascript:topwind();">Click</a> to open
small window.</p>
</BODY>
</HTML>

button.html :

<HTML>
<HEAD>
</HEAD>
<BODY onblur="self.focus();">
<FORM id="select">
 <table cellSpacing="1" cellPadding="2" width="300"
border="0">
  <tr>
   <td colSpan="2">Select options:</td>
  </tr>
  <tr>
   <td></td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>Letters:&nbsp;</td>
   <td>
    <select name="select_l">
     <option value="Option A">Option A
     <option value="Option B">Option B
     <option value="Option C">Option C
     <option value="Option D">Option D
    </select>
   </td>
  </tr>
  <tr>
   <td>Numbers:&nbsp;</TD>
   <td>
    <select name="select_n">
     <option value="Option 1">Option 1
     <option value="Option 2">Option 2
     <option value="Option 3">Option 3
     <option value="Option 4">Option 4
    </select>
   </td>
  </tr>
  <tr>
   <td></td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td colSpan="2">
    <P align="center">
    <input type="button" name="but_ok" value="OK"
onclick="">&nbsp;
    <input type="button" name="but_cancel"
value="Cancel" onclick="">
    </P>
   </td>
  </tr>
 </table>
</FORM>
</BODY>
</HTML>

I placed onBlur on the body tag of "button.html", so
the window with this HTML code will stay always on
top. However, this onBlur event doesn't allow me to
select a value on the dropdown lists,  "Letters" and
"Numbers". Does anyone know how can I put this window
always on top, and at the same time to be able to
select option in the dropdown lists? Thanks!


	
	
		
_______________________________________________________
Yahoo! Messenger 6.0 - jogos, emoticons sonoros e muita diversão. Instale agora!
http://br.download.yahoo.com/messenger/



More information about the Javascript mailing list