My function in HTML file is:
<p onclick='geturl('http://widefide.com/feed')'> Click Me! </p>
<p id="demo"></p>
Now what should be my javascript function to pass that url (i.e. http://widefide.com/feed) to "demo"? Like this? :
function geturl(ok)
{
document.getElementById("demo").innerHTML = ok;
}
This is returning this error: "`Uncaught SyntaxError: Unexpected token } " Is this because thar
element is getting url from PHP+MYSQL? For instance:
print("<p onclick='geturl('" . $title["url"] . "')'>Click Me!</p>