Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
147
rated 0 times [  149] [ 2]  / answers: 1 / hits: 30798  / 13 Years ago, thu, january 26, 2012, 12:00:00

I know that this is elementary, but I'm completely unable to pass this as a parameter to a JavaScript function. I'm numb from trying...



<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content=text/html; charset=utf-8 />
<title>Untitled Document</title>
<script language=javascript type=text/javascript>
function ko(control.id){
alert(control);
}
</script>

<body>
<div idlala>
<a id=la href=javascript:ko(this) >Votes & Concerns</a>
</div>

</body>
</html>


The alert tells me undefined!


More From » html

 Answers
24
<a id=la href=# onclick=ko(this); return false; >Votes & Concerns</a>

[#87781] Wednesday, January 25, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tristab

Total Points: 735
Total Questions: 106
Total Answers: 96

Location: Grenada
Member since Sun, Dec 20, 2020
3 Years ago
tristab questions
Sat, Sep 25, 21, 00:00, 3 Years ago
Sun, Jan 31, 21, 00:00, 3 Years ago
Wed, Dec 2, 20, 00:00, 4 Years ago
Fri, Oct 23, 20, 00:00, 4 Years ago
;