How can i create a new blog?

How do I automatically create a new window, blog stylee?

  • Blogger.com template query - I'm using the Minima Ochre template. What HTML can I add to the template to make all links open in a new window? I love linking to interesting things I find as I trot round the web on my blog. However, I'd also like those interesting things to open in a new window/tab when the user clicks on the link. I know I can add 'target="_blank" ' to the HTML of every link I make, but I don't want to have to do this for every link I create. I'd like to have some HTML in the template that will automatically create a "new window link" for me. Is this possible? If so, how?

  • Answer:

    The following HTML code will enable you to open all of your links in a new window. Stick it between your and tags. (Remove the spaces there, but I think you knew that.)>>>

Rabulah at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

Er. That didn't work. <base target="main">

beaucoupkevin

If you put this in the bottom of your html, right before the end of the body tag, this'll do the job. You can also modify it slightly and add a bit of logic to get a bit more control over what, exactly, becomes an external link.<script>var links = document.getElementsByTagName("a"); for (var i = 0; i { links[i].target = 'ext' + i; }</script>>

ph00dz

err... there's a weird br> in there. (Stupid previewer... you have failed me!) Let's just try it this way: var links = document.getElementsByTagName("a"); for (var i = 0; i { links[i].target = 'ext' + i; }>

ph00dz

Ugh. Please don't make my browser do what you want. If I want a link in a new window, I'm perfectly capable of doing that myself. Your site's look and feel is your domain; my browser is my domain.

Mikey-San

beaucoupkevin & ph00dz - I tried both of your techniques that you kindly suggested, but both times Blogger throws up an error when I try to preview. Mikey-San - I don't really see how your response answers my question.

Rabulah

I agree with Mikey-san. It's about web browsing philosophy, but it's important. Whether a link opens in a new window should be up to the person viewing the page, not the page's author. If I want a link to open in a new window, I'll use the contextual menu (I think it's a right-click if you're a windoid). If you force my browser to open a new window when I click a link, I can pretty much guarantee that your site will disappear from my bookmarks forever. Are you afraid that people won't hit the back button after you've vectored them to some new site? The answer is to make your content compelling enough that they will come back or choose to use the contextual menu (as I do) to preserve the originating page.

metabeing

I didn't ask "Is it a good idea for $this to happen?". I asked how I could make it happen. If I had wanted to discuss whether it was a good idea or not, that would have been my question. Since it wasn't, I'd appreciate it if those responding actually read the original question, and responded to it, rather than the moral issues surrounding it.

Rabulah

Mikey-San - I don't really see how your response answers my question. No offense, but I don't really see how your question is the best idea in the first place. Sometimes the real solutions are to the questions we should've asked, but didn't. In your case, the best answer is not to do what you're attempting to implement.

Mikey-San

No offense, but I don't really see how your question is the best idea in the first place. I didn't ask if it was a good idea. I asked how it was done. Pretty clearly too, I think. An response that doesn't answer the question is worse than useless.

Rabulah

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.