here is the problem.. i have a javascript file which is named javascript.js like this
$(document).ready(function(){
function init()
{
//code goes here
}
}
now the index.html file has a command button which should call the init() function.
<html>
<head><script src=javascript.js ....></script>
<body><button type="button" onclick="init()">Call Init!</button></body>
</html>
But it doesn't call it. Nothing happens as expected. Please suggest a solution.
</head>?, what is....?), no homework (any error messages in the javascript console?). Actually after seeing so much sloppiness I didn't even pay attention to the content. I bet the same happened to many other viewers.