Code to open in new window?
2 posters
Page 1 of 1
Code to open in new window?
I have a clickable on my forum, but the link opens in the same window, how do I open in a new window?
I have a clickable image that opens in a new window, but I can't seem to find what the code is that's making it do that.
I have a clickable image that opens in a new window, but I can't seem to find what the code is that's making it do that.
WatchfulShadow- New Member
- Posts : 22
Reputation : 3
Language : English
Re: Code to open in new window?
What code did you add?
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Re: Code to open in new window?
The code is from the Social Widget...
- Code:
<div class="twitter takip" onclick="location.href='http://www.twitter.com/'">
</div>
WatchfulShadow- New Member
- Posts : 22
Reputation : 3
Language : English
Re: Code to open in new window?
- Code:
<div class="twitter takip" onclick="window.open='http://www.twitter.com/'">
</div>
Are you just adding a image link since you have its css somewhere else?
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Re: Code to open in new window?
Didn't work.
I have everything set, the links for the images work. The only problem is I don't know how to make them open in a new window on click.
I have everything set, the links for the images work. The only problem is I don't know how to make them open in a new window on click.
WatchfulShadow- New Member
- Posts : 22
Reputation : 3
Language : English
Re: Code to open in new window?
Where have you added this?
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Re: Code to open in new window?
The links to the websites are in a Javascript and also a Widget. I am not the founder of my forum, so this was the only (I think) way to make this work. This is supposed to be done under the 'Templates' section, but as I said, I am not the founder so I do not have access to this. I had to make this into a widget for it to work.
Like I said, everything works fine. Apart from this little problem.
I replaced the original link with the one you provided, didn't work.
Like I said, everything works fine. Apart from this little problem.
I replaced the original link with the one you provided, didn't work.
WatchfulShadow- New Member
- Posts : 22
Reputation : 3
Language : English
Re: Code to open in new window?
Such a easy html code could work in a widget.
- Code:
<a href="http://hitskin.com" target="_blank"><img src="http://i62.servimg.com/u/f62/11/22/70/40/fmfire10.png" border="none"></a>
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Re: Code to open in new window?
Didn't help.
This is the full code in the Widget...
If you want to see what it does as it is, go to http://brothersofpain.forumotion.com/ You'll see the images on the left. I want them to open in a new window.
If you want the code from the Javascript, let me know.
This is the full code in the Widget...
- Code:
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Social Media Buttons</title>
<script src="dkthemes.forumotions.in/38797.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".takip").mouseover(function(){
$(this).filter(':not(:animated)').animate({width:135},{duration:500});
});
$(".takip").mouseout(function(){
$(this).animate({width:42});
});
});
</script>
<div id="takip">
<div class="facebook takip" onclick="location.href='http://www.facebook.com'">
</div> <div class="twitter takip" onclick="location.href='http://www.twitter.com/'">
</div>
<div class="Youtube takip" onclick="location.href='http://www.youtube.com'">
</div>
If you want to see what it does as it is, go to http://brothersofpain.forumotion.com/ You'll see the images on the left. I want them to open in a new window.
If you want the code from the Javascript, let me know.
WatchfulShadow- New Member
- Posts : 22
Reputation : 3
Language : English
Re: Code to open in new window?
Rideem3 wrote:Why are you using JavaScript to open new pages when you can use HTML?
- Code:
<a href="URLHERE" target="_blank">Some Text</a>
So how am I supposed to do it?
WatchfulShadow- New Member
- Posts : 22
Reputation : 3
Language : English
Similar topics
» What is the code for a link to open in the same window?
» script code for clickable link to open in same window
» Open links in new window or same window?
» Dissable open in another window
» open widget in new window
» script code for clickable link to open in same window
» Open links in new window or same window?
» Dissable open in another window
» open widget in new window
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum