Hi
I'm working on some JavaScript code I hope will eventually be part of a JavaScript Firefox extension. The code uses an object literal which has two functions in it as value property pairs. My problem is it appears two functions are not allowed, but one is. I do not know why this should be so I would appreciate if you could look at the code and tell me what's wrong. In my code posted below it works fine if I comment out one function as seen in the posting. However if all functions are in the object literal I get this message in FirerBug "missing } after property list [Break on this error] onMenuItem2: function(y){\n." Well whatever is causing the error it's beyond me. So what is it?
Sincerely
Marc
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>like Ex</title>
<style type="text/css" media="screen">
.fontSize25 *{font-size:25px!important}
.fontSize26 *{font-size:26px!important}	
.fontSize27 *{font-size:27px!important}
.fontSize28 *{font-size:28px!important}	
.fontSize29 *{font-size:29px!important}
.fontSize30 *{font-size:30px!important}	
.fontSize31 *{font-size:31px!important}
.fontSize32 *{font-size:32px!important}	
.fontSize33 *{font-size:33px!important}
.fontSize34 *{font-size:34px!important}	
.fontSize35 *{font-size:35px!important}
</style>
<script type="text/javascript" charset="utf-8">
var bb = {
    onMenuItem: function(x){
		var fontSize = "fontSize" + x;
		document.getElementById('main-window').setAttribute("class", fontSize);		
	  }

/*
		onMenuItem2: function(y){
		var fontSize = "fontSize" + y;	
		document.getElementById('bookmark-window').setAttribute("class",fontSize);
		}
*/
}

</script>
</head>

<body>
<a href="#"  onclick="bb.onMenuItem(25)" >future main-window<a><br/>
<a href="#" onclick="bb.onMenuItem2(35)" >future bookmark-window<a>	
<div id='main-window'>
	this is some text to look at<br/>
	this is some text to look at<br/>
	this is some text to look at<br/>
	this is some text to look at
</div>
<div id='bookmark-window'>
	this is some text to look at<br/>
	this is some text to look at<br/>
	this is some text to look at<br/>
	this is some text to look at
</div>
</body>
</html>