>From what I could find about the subject, you can use <script> tag in a 
text/html tiddler but the simple examples I seen shown (shown below) don't 
work in my TW-- I get the iframe but no content.  Using single file TW 
5.1.17 & 5.1.19 with latest Firefox.

<script type="text/javascript">
alert("Hooray");
</script>

<script type="text/javascript">
alert("hooray!\n\n"
  + "Your username is '" 
  + window.parent.$tw.wiki.getTiddlerText("$:/status/UserName") + "'\n\n" +
  + "And this wiki is called '"
  + window.parent.$tw.wiki.getTiddlerText("$:/SiteTitle")+"'");
</script>

I'm using javascript (shown below) to manipulate an external svg to display 
with an <object> tag -- it works if I have it in an external html that I 
display in an iframe but won't work in a text/html tiddler.  I'm probably 
dealing with multiple issues-- any hints would be greatly appreciated.

<object id="svg-object" data="stormsmuth.svg" type="image/svg+xml"></object>
<script type="text/javascript">
  window.addEventListener("load", function() {
  var svgObject = document.getElementById("svg-object").contentDocument;
  var svg = svgObject.getElementById('stormslayers1');
svg.setAttribute("viewBox", "100 100 400 400");
  var element = svgObject.getElementById("CITYLIMIT");
element.setAttribute("stroke", "#ee82ee");
element.setAttribute("stroke-width", "4px");
element.setAttribute("stroke-dasharray", "3 1 1 1 3");
  var element2 = svgObject.getElementById("sectbord");
element2.setAttribute("stroke", "pink");
element2.setAttribute("stroke-width", "2px");
element2.setAttribute("stroke-dasharray", "2 2");
  var element3 = svgObject.getElementById("sectname2");
element3.setAttribute("fill", "white");
  console.log(svg);
  });
</script>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/54f781af-59a5-4755-9f0b-eccb57cdadf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to