Basic question so I feel dumb but…, Whats the proper syntax below in the href?
The href:
<html>
<a href="javascript:navClickListener("navContent", "bodyContent" "http://somelink.com");"></a>
</html>
The Function:
function navClickListener(appendE, target, gotoURL) {
//doing stuff
};
When you really have to use inline JavaScript, use different quotes, eg
'or".Currently, the HTML attributes are marked by double quotes, as well as the JavaScript code.
In this case, since you’re using a JavaScript-URI, you can also use
%22instead of double quotes.Demo: http://jsfiddle.net/pu3CM/