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 10:49:16 +0100 Organization: A noiseless patient Spider Lines: 22 Message-ID: <87k2fvr1er.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="23681"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18EPzdbPxPE66TWSNa2B1WSB68QUKjw/vk=" Cancel-Lock: sha1:svirwYOuK/Y7bnE6AEEN9KwtXG8= sha1:VqFxZUMtTvL1fkR5Vc9JouH3T4o= X-BSB-Auth: 1.fa95d1062de2821500d9.20160805104916BST.87k2fvr1er.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:31074 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.