IE should never been invented!!

gaptrast

Member
Messages
123
Reaction score
0
Points
16
<div onclick="window.open('http://x10hosting.com/forums/')">x10 Forum</div>

If I click at this link in Firefox, chrome or any working browser x10hosting forum will open in a new tab.

But in IE it opens like a annoying popup window!!

I hate IE

Is there anything I can use to get this thing to open a new tab in IE too?

Kind regards,

gaptrast
 
Last edited:

jordan14

New Member
Messages
2
Reaction score
0
Points
0
Wouldn't just changing the code to a link code be better?

<a href="http://x10hosting.com/forums" target="_blank">x10 Forum</a> < That should open in a new tab?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Just as well. Forcing a link to open in a new window takes control away from users in just the sort of area it shouldn't. If users want a new browser or tab, they can open one themselves. New windows/tab have their place, but it's a very limited one (namely, pages that shouldn't be a part of a tab's history, pages that don't lead anywhere else). Off-site links, for example, aren't in this category.
 

gaptrast

Member
Messages
123
Reaction score
0
Points
16
SOLVED IT!!!!

The problem of having a normal <a href="" target="_blank"> was that I ned to modify the href in javascript first. Therefore I did this:::
Code:
<script type="text/javascript">
var var1=/SOMESTRANGETHINGSHERE
var var2=/THECLOCK OR SOMETHING
document.write('<a target="_blank" href="http:\\example.com\' + var1 + var2 + '.php">')
</script>
<img src="http://x10hosting.com/forums/programming-help/..." />
</a>

:):) thanks to all!!!

---------- Post added at 03:16 PM ---------- Previous post was at 03:10 PM ----------

hrrmpf IE does open the target=_blank in a new window too!!!!!!!

%&¤¤##@¤ Is there any code to fix this (opening a new tab with _blank in IE)??
 

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
There is no way to force one or the other. Javascript or the link simply says it wants a new browser tab/window at a given location and it is then down to the architecture of the browser to decide whether it will then open a tab or a new window. So trying to use Javascript to decide which one should not be possible as this is going against the user's decision; i.e if they want tabs, they get tabs and your site shouldn't be making new windows instead.
 
Top