Here's a new day.
Sparerep blog.
This was part of the test of the link box. There are two boxes because the two references I was looking at are coded a little differently, so I put both in.
Incidently, it is a seperate page element and not part of this post.
This was part of the test of the link box. There are two boxes because the two references I was looking at are coded a little differently, so I put both in.
Incidently, it is a seperate page element and not part of this post.
2 comments:
I played with this as a result of the help group question.
The question pointed to http://atrios.blogspot.com/ and http://www.randomwalks.com/links/. The code to do the box is slightly different in the two links, so I tested both. Since the check box in the atrios blog looks a little neater that's what I would use.
Both the javascript and the check box code were put in an HTML/javascript element, that's the only way it would work for me.
Since the code has credits, I'll post it here.
How-to:
1. Customize the template and "Add a Page Element".
2. Select HTML/JavaScript.
3. In the content area add:
<script language="JavaScript"><!--
// thanks to randomwalks.com for this code
function targetLinks(boNew) {
if (boNew)
where = "_blank";
else
where = "_self";
for (var i=0; i<=(document.links.length-1); i++) {
document.links[i].target = where;
}
}
// -->
</script>
<form><input name="targetnew" onclick="targetLinks(this.checked)" type="checkbox"/> check to have links open new windows</form>
4. Leave the Title box blank.
5. Save Changes.
6. Position the new element.
7. Save and test.
Note: If you block copy the code you may have to replace the code for < and > with the real things.
Tom
I have removed the check box that I didn't like, so now the code looks like the 5/17 2:09 comment.
Post a Comment