JQuery :: Opening Links Under Current Window?

Dec 30, 2009

I'm looking at creating a list of links that when each one is clicked, opens a new window/tab under the current window, the reason for this is that i'm using jQuery .toggle to switch content upon click of a link to reveal a message. They have to read this message before going to the new window, which is why it must be opened below the current window (Hope all that makes sense!).

I've got the content switching part done, which is great, but having some trouble coding the "New Window opening under the current window"

Thw following code (When used with jQuery) opens up a new window under the current window (Yay!) - BUT - this happens on page load simply apply it to the links, and only apply it to link with a certain class e.g. class="newwindow"

Code:
$(document).ready(function() {
var link = $(this).attr('href');
var mer_window = window.open(link, '_blank', 'toolbar=1,location=1,directories=1,scrollbars=1,resizable=1,status=1,menubar=1');
if (typeof mer_window === "object")

[Code].....

View 4 Replies


ADVERTISEMENT

JQuery :: Opening Links In A New Window?

May 2, 2011

how to actually open a link in a new window instead of a new tab.

So far the suggested codes around the internet all come to something like this:

<a href="http://whatever.com/profile/1" id="upload_link" rel="external" target="_blank">To open in new Window</a>

And the jQuery is something like the following:

$("#upload_link").click(function(event) {
event.preventDefault();
event.stopPropagation();
window.open(this.href, '_blank');
});

I read it has worked for some people out there, but in my case it's working only to create new tabs!

I need it to open a new window in Chrome, Firefox and Safari, one with fixed width and height if possible.

View 4 Replies View Related

Opening Overlay Window When Closing Or Navigating From The Current Window?

Apr 25, 2011

code to show ( overlay / modal window ) to the user when closing or navigating away from the page ( i want put in this window facebook share to make the user to share the page in his facebook ) , bytheway i wanna use it in my wordpress in every post could it be happen ?

View 1 Replies View Related

JQuery :: Open Links In New Window Under The Current?

Dec 29, 2009

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 Related

Iframe'd Links Not Opening In New Window

Apr 21, 2009

so I've got this page with the following iframe: <iframe src="http://test.page.local/promo/" height="350" width="214" frameborder="0" scrolling="no"></iframe> And within the framed page, a list of links, a sample of which looks like this: <li><a href="http://www.test.com/johnny-be-good/" target="_blank">Johnny's been good</a></li> yet when I click the links, the page loads within the iframe. The target is set to open a new tab or window, yet the links refuse to do so. I've tried _blank, _top, _parent, and resorted to hijacking the links with JavaScript (which seems to me to be overkill) and nothing works. I know this can't be hard, but its driving me nuts.

View 3 Replies View Related

Opening Drop Down Links In New Window

May 3, 2010

I am not familiar with Javascript and I need to open a link in a drop down menu in a new window. Below is the script that exists now that opens the links in the same window.

[Code]...

View 2 Replies View Related

Creating Links That Opens A Newly Targeted Window And Changes The Current One

Jun 30, 2010

Anyone know how to create this in JS? User clicks on a link, the link opens a new window with new webpage AND the page that had the link then changes to a new webpage as well. So end the end that link takes the user to two new pages. For instance, I am on PageA.html and I click an <a href="">Link</a>. Link take me to a newly targeted page called PageB.html. Then at the same time PageA.html turns into PageC.html.

View 1 Replies View Related

Jquery :: Create Some Links With Window.open Method - When I Alert What Is Being Built, The Links Don't Work?

Mar 10, 2010

I'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.

View 5 Replies View Related

JQuery :: Tabs Ajax Mode - Opening Links In Specific Container

Jan 29, 2009

Tabs jQuery v2.7.4 of stilbuero. I want to use Ajax Mode and open the links in a specifically container. For example:
<div id="box">
<ul id="tabs">
<li><a href="01.html"><span>Tab one</span></a></li>
<li><a href="02.html"><span>Tab two</span></a></li>
<li><a href="03.html"><span>Tab three</span></a></li>
</ul></div>
...
<div id="container"></div><!-- Open external links here (01.html, 02.html and 03.html) -->

View 4 Replies View Related

No Links Opening In New Tab

May 1, 2009

I found a script for drop down menus on the web. I use it on my homepage (www.k66t6-mf.com). The script works fine. However when you click on the links the pages open in a new tab or window. I do not want this. Does anyone know how I can prevent this from happening? (I know there is a lot of code, and I'm sorry about that).

[Code]...

View 2 Replies View Related

Child Window Close Event - Opening Another Link In A Separate Window Using Window.open()

Jan 29, 2010

I 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 Related

Opening The Slideshow Links In The Same Page?

Sep 10, 2009

I've been trying to edit this script but it continues to open my slideshow images into new tabs. I would like that the images on the slideshows when clicked they will open in the same tab. How can I do that? Here is the script I am using

<a href="javascript:gotoshow()"><img src="http://imgkk.com/i/hPnvq8.jpg"target="_self""_innerframe" name="slide" border=1 width=375 height=275></a>
<script>

[code]....

View 6 Replies View Related

Autocomplete - Opening New Page That Links To Document?

Mar 31, 2011

I am working on an internal work site. In the site I have a text box and on entering a specific code I want it to open a new page that links to a document that has the same name. ie. if user types red, I want it to find the document red.html in a folder. To make my colleagues job easier, I want the text box to autocomplete. Below is a section of the code I plan to use:

Code:
<script>
var arrValues = ["red", "orange", "yellow", "green", "blue", "indigo", "violet", "brown"];
</script></head><body>
<h2>Autocomplete Textbox Example</h2>
<p>Type in a color in lowercase:<br />
<input type="text" value="" id="txt1" onkeypress="return autocomplete(this, event, arrValues)" /></p>
</body>
</html>

How to modify this to:
1) Link the text entered to the document I want opened
2) Open this document upon 'enter' pressed

View 1 Replies View Related

URL Links - Controlling HTML Page Opening Query

Sep 21, 2011

I have url links in an Access Database which open different info screens depending on the record. I want to include some code in the html which isn't blocked by browsers, but restricts the html code to an initial window of approx 800x600, but can be resized, but importantly the database screen doesn't 'get lost' underneath the browser window.

View 5 Replies View Related

Form Opening In The Main Window/ Simeltaneiously Closes Popup Window

Jan 8, 2004

I have a popup window which has the search form in. What I want to do is for the popup window to close once the form is submitted, and to post the form data to a page on the main window.

Is anyone able to advise. As the main page is dynamic, it is not possible to give the page a name.

View 4 Replies View Related

Getting [object] Error In Original Window When Opening A New Window

Jul 20, 2005

I'm using window.open and as soon as I click on the link to open the new window, my original page content is replaced with '[object]'.

<
href="javascript:onClick=window.open('leaving.htm','','t oolbar=no,location=no,status=no,menubar=no,scrollb ars=no,resizable=no,width=300,height=400')">Lin
1 </a>


Any ideas ...

View 1 Replies View Related

Opening A Contained Closable Window Within Browser Window?

Feb 2, 2011

I am looking to have a link open a closeable window that is contained within a browser window. If you click on the "sizing charts" link on this website, this is exactly what I am looking to do:

[URL]

The window is contained within the current browser window, it can be dragged around, but not outside the parameters of the browser window.

View 2 Replies View Related

JQuery :: Image Replace Opening In New Window

Aug 15, 2009

I'm having trouble doing an image replace. When you click on the thumbnail link to replace the large image, it opens in a new window instead of replacing the current image.

View 1 Replies View Related

JQuery :: Opening A New Browser Window Via .ajax?

Feb 3, 2010

My current project has me working with UI dialog and I was wondering if it's possible to open a new browser window from a click of the dialog button. I have set up an ajax call to get the url but I'm not sure if this is the correct way.

function createNewProject(irb_id){
jQuery.ui.dialog.defaults.bgiframe = true;
jQuery(function(){
jQuery('#confirmDialog').dialog({

[Code]......

View 1 Replies View Related

Bookmarklet Parse URL - Take The Current URL Of The Page And Open A New Window With A URL Based On The Current Page?

Mar 16, 2009

I'm trying to create two bookmarklets:

1. Take the current URL of the page and open a new window with a URL based on the current page. Some examples (I use "->" to mean "this URL turns into that URL"):I plan to use these bookmarklets in sequence, first pressing 1 to log into the CMS, then pressing 2 to edit the current page.

View 5 Replies View Related

JQuery :: Opening New Window And Hiding Addressbar / Statusbar

Jun 24, 2010

I need to create a new browser window when we click on a button, as we do with window.open() in javascript. I was using that initially, but I was unable to set title of the html page and hide the addressbar and statusbar using it, I tried many things. but its not working in mozilla. I know that mozilla forces the default settings. Is their any way in jquery to both this things.

Here is what I am trying to do in javascript
var width = 600;
var height = 500;
var left = parseInt((screen.availWidth/2) - (width/2));
var top = parseInt((screen.availHeight/2) - (height/2));
var winProperty = "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top+ ",location=no,status=no";
mywindow = window.open('help/help1.html','Window title',winProperty) ;
});

View 6 Replies View Related

JQuery :: Opening Other Window And Then Reading Its Tile Or Content?

Dec 14, 2011

I need to to open a survey page to users who has not anwseredthe survey yet.The survey is in the same domain / path than the main page.If users has allredy anwsered the survey, the page opens with title "Error" and there is error message in the body.I can open the new window from the main page, but I do not know if it is possible to read the title or document content of the new window.I can not edit the survey page to put code there.f I could determine with an if question, did the survey page open to the survey or the error page,then I could close the page or close the main page to bring the survey on top.Is this possible to do?

View 6 Replies View Related

Pop Up Window/Opening Link In Parent Window?

Jul 21, 2011

I have a site where one of the links I have set up to open a pop up window which will display Terms & Agreement information, at the bottom there is a check box and a submit button for users to click on if they agree to the terms. I was able to get that working but the thing is when the user clicks in the check box and hits submit I want them to be directed to a page which has a form on it but I wanted the page to open in the original (Parent) window. This is where I am lost cause I found some coding which will open the page with the form in the pop up window but Ideally once they agree to terms and hit submit I'd like the pop up window to disappear and the new page open in the Parent window... is this possible below is the coding I'm using.

Here is the form:

<form method="get" action="this is where my link will go" onsubmit="return yes_no(this.form) " name="Agree">
<INPUT name="agree" name="agree" value="agree" type="checkbox"> I agree to terms
<input type="submit" name="submit" value="Accept Terms">

[Code].....

View 1 Replies View Related

Setting Dynamic Links Based On Content Slider Current Status?

Mar 16, 2009

I have a content slider called "Codaslider" (ver 1.1 I believe) setup, and using CSS I have an absolute positioned image hovering above the slider at all times. The effect is what I want, where I have a static image of my company's product hovering above the content slider, and the background images slide around showing various features and such.

I would like to make it where the customer can click anywhere within the bounds of the content slider (including on top of the static image), and be able to follow the link for the image in the content slider.

For example, if the background image shows "New Features" or something similar, I want the customer to be able to click anywhere and get to the "New Features" page.

So basically, is there a way to dynamically set the URL that the static overlaid image points to, based on what page the content slider is on?

Here is the javascript that setups up the content slider:

Code javascript:
<script type="text/javascript">
var theInt = null;
var $crosslink, $navthumb;

[Code].....

View 3 Replies View Related

Open Another Site In New Window When Current Window Is Closed

Mar 26, 2006

I've seen sites that do this and was wondering if anybody could has the code to do it.

View 5 Replies View Related

Opening A Window

Jul 23, 2005

I am using the following code to display an image in a seperate
window.

<form>
<input type=button
onClick='window.open("image1.jpg","","width=260,height=260,resizable=0,border=0")'
value=Shhow Picture'>
</form>

I want the window to be the exact size of the image so I set the width
and height of the window the same as the width & height of the image.

The code works, however there is a white border on the top and left
side of the image. If I add 20 to the width and height of the window
then there is a white border around the whole image.

Is there anyway to have the window the exact size of the image,
without this white border? I know there is probably a simple solution,
but I'm a beginner at JavaScript.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved