how to use blog variable on 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?

13.10.2009 14:49:34
1 ОТВЕТ
РЕШЕНИЕ

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

4
13.10.2009 17:15:42
Thank you. That is helpful. If you know about blogger language book or syntax language (b:if ...), tell me please
ebattulga 13.10.2009 17:31:40
Well, what i've done is just download a template and look into the xml file. for books: amazon.com/s/… and also: bloggerfordummies.blogspot.com/2006/04/…
Peter 13.10.2009 17:41:54