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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do this?

Status
Not open for further replies.

CRaSH68

Programmer
Joined
Jun 8, 2006
Messages
3
Location
AU
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Jason</title>
</head>
<script type="text/javascript">
function mytest() {

alert ("test")

}
}
</script>
<style>
<!--
tr { background-color: #FFFFFF}
.normal { background-color: #FFFFFF }
.highlight { background-color: #F0EFEE }
//-->
</style>
<body>
<table border='1' width="537">
<tr onMouseOver=this.className='highlight' onMouseOut=this.className='normal'>
<td width="337">Jason
</td>
<td>
<form method="POST">
<p><input type="text" name="T1" size="20" onkeydown=mytest()></p>
</form>
</td>
</tr>
</table>
</body>

</html>


Thios is my code and i am trying to call the onkeydown function in the textbox .... but it wont execute i think it has something to do with the mouseover event in the row?

In internet explorer 6 it comes up with a error in the status bar how can i get around this?
 
><tr onMouseOver=this.className='highlight' onMouseOut=this.className='normal'>
[tt]<tr onMouseOver=[red]"[/red]this.className='highlight'[red]"[/red] onMouseOut=[red]"[/red]this.className='normal'[red]"[/red]>[/tt]

><p><input type="text" name="T1" size="20" onkeydown=mytest()></p>
[tt]<p><input type="text" name="T1" size="20" onkeydown=[red]"[/red]mytest()[red]"[/red]></p>[/tt]

 
Thanks dude but that still doesnt work ... i think it is a bug ... have you tested it yourself?
 
Also, you have one too many braces in your function. Remove the one in red.
Code:
function mytest() {
    
    alert ("test")
    
    [COLOR=red]}[/color]
}

It's hard to think outside the box when I'm trapped in a cubicle.
 
Cheers thank for that it works like a charm :D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top