Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
javascript causing all links to open in new window?
Old 04-21-2009, 07:47 PM javascript causing all links to open in new window?
Skilled Talker

Posts: 78
Trades: 0
Hello, I just installed a javascript on a page to pull some feeds in and the page displays fine, but it causes all the other links on my page to open in new browser windows. If you follow the .js link below you can see their script.

Is there any tags I can put around the script to isolate it or cause it from screwing up the rest of my code?

Code:
   <script language="JavaScript" type="text/javascript" 
src="http://www.SeniorJournal.com/HeadlineSynd.htm.js"></script>
          <noscript>
          Please enable JavaScript and reload this page.
          </noscript>
(Its also aligning all of the feed text and my header about an inch to the right in IE!; I tried a div align left tag but it does nothing)

Last edited by Boar; 04-21-2009 at 08:20 PM..
Boar is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-21-2009, 09:56 PM Re: javascript causing all links to open in new window?
logic ali's Avatar
Super Talker

Posts: 104
Trades: 0
Quote:
Originally Posted by Boar View Post
Hello, I just installed a javascript on a page to pull some feeds in and the page displays fine, but it causes all the other links on my page to open in new browser windows. If you follow the .js link below you can see their script.
It's probably this line you need to remove:
Code:
document.write( "<base target=\"_blank\">\n" );
Are you hotlinking this script rather than running it from your own domain, and if so why?
logic ali is offline
Reply With Quote
View Public Profile
 
Old 04-21-2009, 10:56 PM Re: javascript causing all links to open in new window?
Ultra Talker

Posts: 250
Trades: 0
Yes i would say it was that too. It looks like it can be changed to something else.

document.write( "<base target=\"_same\">\n" );

For example.

Also have you tried adjusting this line for re-alignment?

document.write( "<body leftmargin=\"8\"> \n" );
__________________
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|

MofoDog is offline
Reply With Quote
View Public Profile
 
Old 04-22-2009, 03:52 PM Re: javascript causing all links to open in new window?
Skilled Talker

Posts: 78
Trades: 0
Thanks logic and mofo - I put the javascript form on my server and changed the target and that worked fine - though too bad because I wouldn't mind having a new target for the feed links themselves, but this seems to be the only way.

I couldn't fix this alignment issue in IE though - I tried deleting this whole line of code and also adjusting the number but it made no difference - all text is still being aligned about an inch to the right in IE for some reason - its fine in firefox and safari..

Code:
document.write( "<body leftmargin=\"8\"> \n" );
Boar is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to javascript causing all links to open in new window?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.72804 seconds with 12 queries