tag:blogger.com,1999:blog-5178450790440842421.post1265422955637021854..comments2011-05-26T06:18:46.953-07:00Comments on Sparerep test site: Adding Open Window Check BoxTomhttp://www.blogger.com/profile/09765311500004289351noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5178450790440842421.post-29747932276548299412007-05-18T01:02:00.000-07:002007-05-18T01:02:00.000-07:00I have removed the check box that I didn't like, s...I have removed the check box that I didn't like, so now the code looks like the 5/17 2:09 comment.Tomhttps://www.blogger.com/profile/09765311500004289351noreply@blogger.comtag:blogger.com,1999:blog-5178450790440842421.post-50529613307910820652007-05-17T14:09:00.000-07:002007-05-17T14:09:00.000-07:00I played with this as a result of the help group q...I played with this as a result of the <A HREF="http://groups.google.com/group/blogger-help-howdoi/browse_thread/thread/be83767732bd66dc/408fbd258b3f99f2#408fbd258b3f99f2" REL="nofollow">help group question</A>.<BR/><BR/>The question pointed to <A HREF="http://atrios.blogspot.com/" REL="nofollow">http://atrios.blogspot.com/</A> and <A HREF="http://www.randomwalks.com/links/" REL="nofollow">http://www.randomwalks.com/links/</A>. 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.<BR/><BR/>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.<BR/><BR/>Since the code has credits, I'll post it here.<BR/><BR/>How-to:<BR/>1. Customize the template and "Add a Page Element".<BR/>2. Select HTML/JavaScript.<BR/>3. In the content area add:<BR/><script language="JavaScript"><!--<BR/> // thanks to randomwalks.com for this code<BR/> function targetLinks(boNew) {<BR/> if (boNew)<BR/> where = "_blank";<BR/> else<BR/> where = "_self";<BR/> for (var i=0; i<=(document.links.length-1); i++) {<BR/> document.links[i].target = where;<BR/> }<BR/> }<BR/> // --><BR/></script><BR/><BR/><form><input name="targetnew" onclick="targetLinks(this.checked)" type="checkbox"/> check to have links open new windows</form><BR/><BR/>4. Leave the Title box blank.<BR/>5. Save Changes.<BR/>6. Position the new element.<BR/>7. Save and test.<BR/><BR/>Note: If you block copy the code you may have to replace the code for < and > with the real things.<BR/><BR/>TomTomhttps://www.blogger.com/profile/09765311500004289351noreply@blogger.com