Log In · Register

 
JS Include?
fiasco
post Jul 23 2006, 09:38 PM
Post #1


Newbie
*

Group: Member
Posts: 1
Joined: Jul 2006
Member No: 443,012



It seems to me that Xanga blocks js includes. And my knowledge of js is very limited.

I've been trying to get this to work instead:
CODE
<script>
var m = document.createElement('script');
m.src = "http://www.tomfaulkner.org/xanga/witty.php?type=js";
document.write(m);</script>


I don't think Xanga likes that either.

The goal is to include the js from my personal site into xanga in a custom module.

This worked, sort of.

CODE
<script>
var offset = -6;
var h = document.getElementsByTagName('head')[0];
var l = document.createElement('script');
l.src = "http://www.tomfaulkner.org/xanga/witty.php?type=js";
h.appendChild(l);</script>


But I don't know how to place it where I want it. In this case it goes to the bottom of the page of course.

I also tried to change the getElementsByTagName to getElementsById. I think that would probably work, but I don't know how to make it work.

My xanga I'm trying to put this where the quotebox is. To make random quotes instead of a static one.

Thanks for any help.

Tom
 

Posts in this topic
fiasco   JS Include?   Jul 23 2006, 09:38 PM


Closed TopicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: