I'm using blogger.com. I need to use data:blog.url variable on the javascript. But i don't know how to assign to any javascript variable.
How to get blogspot variables on the javascript?
I'm using blogger.com. I need to use data:blog.url variable on the javascript. But i don't know how to assign to any javascript variable.
How to get blogspot variables on the javascript?
if this doesn't works:
<script>
var blogURL = '<data:blog.url/>';
</script>
then try this:
<div id="blogurl" style="display:none;"><data:blog.url/></div>
<script>
var blogURL = document.getElementById('blogurl').innerHTML;
</script>
But if you want to get the page URL in javascript you can use window.location
disclaimer: i've never used blogger
@ebattulga Have you got the solution. I have come across with the same problem. I want to access "data:blog.url" within a Java Script (for share this scriptlet)