Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Open all links in new window Date: Fri, 05 Aug 2016 15:08:33 +0100 Organization: A noiseless patient Spider Lines: 44 Message-ID: <878twbqpem.fsf@bsb.me.uk> References: <59e0b44d-8ea8-431d-ae12-e7585917f23f@googlegroups.com> <8737mku9we.fsf@bsb.me.uk> <7956cde6-c641-485f-9144-e7ce529f0cd8@googlegroups.com> <87wpjwsj4w.fsf@bsb.me.uk> <56528385-a0f0-4b95-b138-830a6ad9beec@googlegroups.com> <87k2fvr1er.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="8168"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mCe9vT1/myJ/eHwEwhIdRpImWoLG7vW8=" Cancel-Lock: sha1:eAVbhpVcK1ryiErS7ByGCoWlbT8= sha1:jrKjHZ7wHLjC44vd7Fpbt0UsfDA= X-BSB-Auth: 1.4add876d03dee7705a00.20160805150833BST.878twbqpem.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:31076 Chandramohan Akkoni writes: > On Friday, August 5, 2016 at 3:19:24 PM UTC+5:30, Ben Bacarisse wrote: >> Chandramohan Akkoni writes: >> >> > Currently I have the below code which makes the external web page >> > links open in a new window. >> > >> > if (thelink.indexOf("http://www.google.co.in/" || >> > "http://www.facebook.com/") !== 0){ >> > linkarray.target = "_blank"; >> > } >> >> Is that really what you have? Do you know what it does? >> >> > All the internal micro-sites are also opening on a new tab, which >> > should happen. Example: >> > http://books.google.co.in/ >> > http://developers.facebook.com/ >> >> Did you miss out a "not"? >> >> >> -- >> Ben. It's better to snip signatures. > No no Ben, I have shared the dummy urls as examples. My need is to > load the micro-sites in the same window. As with the current code, > they are opening on a new tab. Why don't you answer questions? You seem to expect help without helping us help you. Do you know what the code you quoted does? I ask because, as written, it is certainly wrong. Another problem is that you are not showing us the code that does what you say. Something is setting target = "_blank" for the sites you don't want opened in a new window/tab. It may be that the best solution is to fix that code rather than to add more. -- Ben.