Open Links In New Window?
Feb 2, 2011I want to open links marked with class="external" in a new window, how do I do that?
View 2 RepliesI want to open links marked with class="external" in a new window, how do I do that?
View 2 RepliesI'm using jquery/ajax to create some links with window.open method. Here's the relevant code:
$("#content").empty();
$.ajax({
type: "GET",[code]..........
Basically, when you click a link a function is called with a parameter based on the particular link you run. Then the code runs through an xml file, and if the parent of the nodes I've cyling through has a value equal to the parameter past to the function, that node is used to create a new link with window.open function attached to it.It all works, or seems to, and when I alert what is being built, it looks right to me, yet the links don't work.I've attached a copy of one of the alerts of one of the links as it's built.
I have a problem on the links on my page im working.sorry guys still a noob and my english is not that good. :b. my question is like i have a list of packages of food. [link_a] [link_b] [link_c] and i have a function that i put in my head tag:
function linkA()
{
window.open('link_a.html','link','width=300,height=200,resizable=yes');
}
now i can go to linka.html by click my link <A HREF="javascript:linkA()" >link a</A> is there a way i can have one functions that can open a link depend on what page .when it clicks then go to its designated page or i have to stick on writing function for linkB ,C,D and so on.
I've got this row of images (in the end there will be more rows of pics
as well). When a user clicks on the image, I want a new window to open
with a larger version of the image. I want that new window to be
customized to the size of the new larger image. Also, when users go
back to see other images in their larger size, I want the new window
(assuming they never closed the first one) to come back to the front.
I've only gotten as far as getting the larger images to open in a new
window at a set size in the function. I thought I could just make
specific scripts for each image, but that would be cumbersome to say
the least....
I would like to open the links in a new window but when i Use target=_blank anywhere I keep getting errors. Code:
View 1 Replies View RelatedI am completely a beginner at coding and really do not know much right now.
This is the day of week link rotation script which works just great:
<script type="text/javascript">
<!--
var MyEveryDayLinks = [
['Sunday', 'http://www.google.com', 'Google'],
['Monday', 'myURL', 'LinkName'],
[Code]....
Unfortunately I can't open urls in a new window.
I would so like this to work...but don't know why i can't make it work.
I've tried something like this with no luck..
<a href="javascript:[window.open(' + MyEveryDayLinks[L][1] + ', 'height=200, width=200',)];">' + MyEveryDayLinks[L][2] + '</a>.') ;
I have implemented an iframe that contains several links to other pages. I can't change the content of the iframe because it's on another server.
Here you can see an example of the code for one link in the iframe:
<a href="javascript: void(0);" onclick="openUrl('http://www.streambeam.org');" title="">Link 1</a>
Now I would want those URL's to open in a new file, so I can add a frame on top that refers back to my own site.
Now my question is: Is this possible, without changing anything in the iframe?
I am using Toby's iKonize script and would like to add a little more functionality to the script but not sure how to.
I would like the script to find all external links and have them open in a new window, rather than setting the target, can this be achieved? Also, if the image could be added after the anchor so it doesn't get any of the styling associated with the anchor element.
I have 30 or 40 different (going to different websites) links on many pages on my website, that I when clicked I need opening under the current window. (Pop-under) - but obviously needs to be done safely (no risk of being pop-up blocked??)So rather than just a target="_blank" - it would be something slightly more complicated, doing a bit of research perhaps the .blur method would help (Though really I have no idea)I'm using the jQuery library for other elements on the site, so jQuery would be ideal if there is a solution for this?If you click on "get code and open site" (Green button) - you'll see it opens up the website under the current window - which is exactly what I want to achieve (It also uses .toggle to switch divs (but i've done that part - just need help with pop-unders
View 4 Replies View RelatedI have seen that i can avoid the char # from my urls if i use the directly link to the pages and selet a TARGET to them... but for this i have use the target option in the <a> code:
<li><h2>
<img src="img/prensa.png" class="ui-li-icon"/>
<a href="subcategoria/prensa/prensa.html" target="_self"> Prensa </a>
[code]....
turning the following inline code:
<a href="http://www.bing.com/" name="bing" onclick="return !window.open(this.href)">Bing</a><br>
<a href="http://www.lycos.com/" name="lycos" onclick="return !window.open(this.href)">Lycos</a><br>
[Code]....
into an external javascript function that will do the same thing (open all links in a new window individually if javascript is enabled, without destroying links in html for if javascript is not enabled).
The link will be ad generated by Javascript code.Here is a bit more detail about my situation. I am creating a web-based mobile app. In other words, the native app acts just like a set of frames that load web pages. One of the frames loads an ad. The ad is invoked via javascript provided by various mobile ad networks.On the iPhone, we are noticing the ad loads within the ad frame inside the app, instead of spawning a new browser window. We would like to resolve this w/ javascript code that forces all links (specifically links generated via javascript) to open in a new browser window.
View 5 Replies View RelatedI am using malsup's gfeed plugin with a feed on a site. The links go to an external site.How can I change the jquery of the plugin to open the links in a new window? Or how do I overwrite the "target="_self"" on links with jquery? Nothing I am trying is working. I am not new to jquery, but slow in learning.[URL]
View 1 Replies View RelatedI have a page whit many links ( for example a Dictionary ) ,I want all links in this page open in the special window size whitout scroll ,statusbar,toolbar,.....
I have script for one link but I want a one code for all links or the script which I can insert in head of main page for all links .
[Code]...
And i need edit this code that it open the links in select to _blank not to a new window
I am using this script: [URL] All I want that I can't figure out is for the links to open in a new window. Nothing fancy just new/blank window. I am guessing it needs to be done in one of these 2 spots.. In the html, it must be in the HandleGoClick line found here:
[Code]....
I am trying to open some SWF videos from an HTML page. When the user clicks the link, I would like to have the videos open in a transparent window (not a separate browser wndow).
I have figured out how to embed the files and have them open in a transparent window as soon as you load/refresh the page but I want to open the SWF using a link.
I have some code which forces external urls to open in a new window, it works great but an Addthis I have added to the exclusion list still opens in a new window (which is a fallback if there is no .js etc) (as well as the popup appearing).Really not sure what to do about this, any suggestions will be welcome. Maybe change the new window method from simply adding the target="_blank"?
View 1 Replies View RelatedI have the existing code that will change all my links to external sites to open in a new window. I now want to change it to allow me to have a way that it will not do this if I put something special in the a href tag.
Code:
Let me start of by saying that I'm a designer, not a programmer so I'll apologize in advance for having very little knowledge of javascript.I found a free script for a auto-advancing slideshow that allows you to give each image in the slideshow a unique link. My problem is that when you click on one of the pictures the link opens in a new window instead of loading in the default browser window. I have tried to search google for an answer but my lack of javascript knowledge has left me scratching my chin.Here's the code in the head of my page:
<script language="JavaScript1.1">
<!--
/*
[code]....
I have this piece of code which is opening link in new window:
How to change this code so link would open in the same window?
Probably I should change this part: javascript:void window.open
How to open a link on the same window using window.open or any other method in JavaScript.
View 2 Replies View RelatedI have a HTML and I am opening another link in a separate window using window.open() . The child window is something like 'http://yahoo.com' which is out side html. I need to refresh the parent window when the child window is closed.
View 4 Replies View RelatedCode: window.location but have it open in new browser window (like with target="_blank", not window.open)
View 7 Replies View RelatedThrough window.open or window.showmodaldialog, I want to open a word
or excel document in Print Preview mode. Bcos I don't want the user to
make any changes or save it but the user can ONLY VIEW OR take a print
out.
I'm using an <A> tag with an onclick event to open a window with JS (window.open)... In FIREFOX, if I click very quickly, multiple windows open. Not a problem in IE.
View 8 Replies View Related