Javascript- Function Not Defined Error
I have a html page with a button whos onclick calls a javascript function...but I have been getting a function not defined error for two days! Can someone help?
Solution 1:
This might be handy:
http://jquerymobile.com/demos/1.2.0/docs/pages/page-scripting.html
You need to stick your scripts
within the page
element:
<divdata-role="page"><script>functiondoSomething(){
alert('this is a test');
}
</script><!-- the rest of your stuff --></div>
Solution 2:
In fact i have passed personally with this error even with valide HTML all what you need to do is move all of your functions to the head
element.
Here is a fiddle:
To demonstate what i have said in the framework & change the NoWrapToHead
to onload
Post a Comment for "Javascript- Function Not Defined Error"