Skip to main content

Posts

Showing posts from March, 2014

onClick() does not work in jsfiddle or no results when run the code

Error :   On the LHS of Jsfiddle.net below the  'Frameworks and Extensions' section,  if the dropdown option is set to Onload / OnDomreadey - the below code will not show any result.. <a href="#" id="dfddis"  onclick="Alertbox();">Alert</a> function Alertbox()          {              alert('The Alert!');                   } FIX Set the option in the dropdown menu to 'No wrap -<Body> ' / 'No wrap -< head>'. Yup! otherwise your body is messed up :( Reference http://jsfiddle.net/XPLr6/3/

jsfiddle.net {"error": "Please use POST request"} on a href = ""

Error: <a href="" id="dfddis" onclick="Alertbox();">Alert</a>       function Alertbox()          {              alert('The Alert!');                   }  - This will throw  {"error": "Please use POST request"} in jsFiddle.net Fix : Jquery tries to navigate to an empty target. A '#' will keep the link target within the same page / document. Use a '#' in the href.  <a href= "#"   id="dfddis" onclick="Alertbox();">Alert</a> Reference: http://jsfiddle.net/XPLr6/3/