I don't know why I am getting this problem. I have used prototype before in javascript and it works fine but for some reason it is not working here:
test.html:
<script type="text/javascript">
$(document).ready(function(){
UserOptions("test");
});
</script>
UserOptions.js:
function UserOptions(username){
...
var userOptions = document.createElement("div");
userOptions.className = "userOptions";
**this.createBtns(userOptions);**
userContainer.appendChild(userOptions);
contentCenter.appendChild(userContainer);
contentCenter.appendChild(br);
BuddyList();
}
UserOptions.prototype = {
createBtns:function(parent){
var self = this;
/* Add Buddy Button */
var addBtnContainer = document.createElement("div");
addBtnContinaer.className = "addBtnContainer";
...}
I keep getting the error Object has no method 'createBtns'