Link To Page Using Target Blank & Linking Page's Window Location?

Feb 16, 2011

Basically, I have a link that should open the targeted link in a blank page, and upon the link being clicked, the original page's URL should be changed. The reason for this is that the user has to browse information on another website, and then pass the information on to me via a contact form, so rather than make them click back on my tab in the browser, and then find the "Contact" page link to fill in the form, I thought it would a good feature to simply go ahead and load the "Contact" page upon them clicking the link to the external page (which of course loads in a new tab). Here is the code I have in place:

Code JavaScript:
<a href="http://www.othersite.com/" target="_blank" onclick="window.location.href='http://www.mysite.com/contactus.php';">Other Site</a>

This all works fine on my computer, regardless of the browser that I use. One of my partners on this project called me this morning and said that the link was taking him directly to the "Contact" page without opening the "Other Site." This is strange because after I put this in place, I showed it to him and it worked fine. Now, a few days later, and it does not work. He said that he cleared his browser cache, history, cookies, etc. and the problem did not go away. He uses IE8. After he told me it was no longer working, I went to test it myself, and it works fine for me no matter which browser I use (IE8 or 9, Firefox 3 or 4 Beta).

why this might have worked one day and not the next? Is it simply a problem on his computer, or could it be an issue where based on what type of browser you are using, this won't work. Also, I know this is the JavaScript forum, but is there a way to do this in PHP without using the JavaScript onclick event? Obviously, I can't use the header() function since this functionality needs to be present on a link within text of a page.

View 2 Replies


ADVERTISEMENT

Target Window.location.href To Iframe On New Page

Jun 15, 2010

I know next to nothing about javascript and I don't even know if this is possible. I need to target window.location.href to an iframe on a different page. So, right now, the piece of the code that redirects the browser looks like this: window.location.href='http://www.somewhere.com/'; Works great, brings it up in the same browser window. So now I need to modify the code so it goes to a different page and brings that page up in a specified iframe.

View 6 Replies View Related

Target="_blank" Functionality - Target Page To Open It As Top Location From Within An Iframe

Mar 24, 2011

I am using the following javascript on the target page to open it as top location from within an iframe, which is working ok.

<script type="text/javascript">
if(self!=top) {
top.location.href=location.href
}
</script>

However my problem occurs when the user uses the browsers back arrow to return to the previous page, the script executes again returning them once more to the page they have come from. Is anyone aware of a work around to this problem as it would seem there isn't one? perhaps even a better solution for opening the target page from the iframe as top location. This is really causing confusion for users, and I really need to get the issue fixed.

View 2 Replies View Related

Location.href Ignores Assignment And Loads A Blank Page

Jul 20, 2005

I have a webpage(with a text field and a button) which prompts for a
local file and attempts to load the file in the window if the user
clicks on the button. The javascript code onClick event uses the
location.href property to achieve the desired result. (This loaded
page has some additional functionality which lets them upload the
contents to the server.)

This approach only seem to work for some computers and on others it is
loading a blank page. I have alerts in the code to show that
location.href is correctly reflecting the file location after the
assignment. When it is loading the blank page I see the message
"Opening page about:blank" on the status bar. Iam currently using IE6
sp1 on Win2k. This issue is not just limited to this combination. We
are experiencing issues with IE5.5, WinXP as well.

The code works if I pass a web site address. It only fails if I
attempt to pass a file name(c: est.htm)

Any thoughts on why the blank page is being loaded or how can I go
about resolving this issue.

View 2 Replies View Related

JQuery :: Using "window.location" For Link But Back Button Does Not Refresh Initial Page?

Nov 1, 2011

Here is the url:The issue, as you will see, is initially when my front page loads the "menu" animates into place. Then after a button is clicked:

$(".home_button").click(function() {
$('#content_menu').stop().fadeOut(1000,function() {
window.location = "http://jquery.com/";

[code]...

That all works fine. The issue is when I use the back button on the browser to return to the home page the animation never triggers and the page remains unusable until a refresh. How can I have this page refresh when the user uses the back button and/or is there a better way to do what I'm asking?

View 1 Replies View Related

Target Blank And Close Popup Window?

Sep 18, 2011

I have a popup window that has a "link" inside it, which needs to have a target=_blank but when ever clicked in IE, it stays inside the same window.I tried all of the following, none work

<a href='http://www.myurl.net' onclick='window.close();' target='_blank'>
<a href="http://www.myurl.net" target="_blank" onClick="javascript:window.close()">
<a href="http://www.myurl.net" target="_blank" onClick="javascript: setTimeout(window.close, 10);">

View 10 Replies View Related

Hyperlink Not Present - No Link Specified It Will Open A Blank Page

Nov 8, 2011

In my .js file i am having one variable image2.

Here as there is no link specified it will open a blank page. guys can u please tell me how can i write a condition so that if my href is blank then it will not open any page. the click should not work or else it should load the same page.

View 1 Replies View Related

Open In New Window - Insert The Target="blank Tag But Can Not Seem To Get It To Work

Jan 21, 2010

I have a domain name registration field that links to a reseller storefront and then searches for that domain name. I would like the storefront to open in a new window, instead of the parent window. I have tried to insert the target="blank tag but can not seem to get it to work. Is there another way to make that window open? You can see the page and field here: [URL] The field is on the left side, just below the center of the page.

View 6 Replies View Related

JQuery :: Target Anchors From A Link On A Different Page?

Sep 3, 2010

Using cycle "pager" to call anchors with buttons within ONE page. but, i'm also trying to call these same anchors to show up when referenced on that same page, but from a link on a different page.

I can't seem to get the external page link to go-to the proper anchor on the destination page. I've tried the simple:

<a href="http://website/womens-apparel#">Womens Apparel</a> (traditionally, this would go right to the destination anchor on the targeted page)

I've also tried to set an ID to each anchor in the the destination div, but it won't reference it.

View 1 Replies View Related

Linking Template Page To Open A File In Another Window?

Sep 16, 2011

I am building a static website, and I have images in my index page each image has a title name, how do I make an image clicked to open in a different window if clicked, I have a template page designed to be used for opening an image in a different window if clicked but I don`t know how to configure everything. Secondly, I would want the image to be placed in a particular section in the template page.

View 2 Replies View Related

MooTools SlideShow - Find Some Extra Blank Space In The Page After The Copyrights Link

Feb 18, 2010

just look at the scroll bar in your internet browser when the picture slide working you will find the scroll getting extended - the page must be ended by the copyrights down of the page and after the slide you will find some extra blank space in the page after the copyrights link.

View 1 Replies View Related

JQuery :: Part Page Refresh - Load Page It Does Nothing Only Blank Page

Feb 1, 2011

[Code]...

when i load page it does nothing only blank page, may have code in wrong place but not sure so can someone show me a working example so i can find out what i'm doing wrong also i would like the part of page to refresh evey 120 seconds is this possibe with jquery?

View 7 Replies View Related

When Page Location = Link, Then Add Class?

Oct 4, 2010

I need some help with a function. Here is what I want it to do: When the page location equals a link on the page, then add a CSS class to that link.

View 1 Replies View Related

JQuery :: Way To Add Target Attribute To Window.location

Aug 22, 2011

I have a homepage with two frames. The left frame is the navigation menu with about 30 links to different websites. The right frame (frame name is "display") is used to display the content of websites when user click on the links on the navigation menu.Left Navigation MenuThis is part of the codes of the Left Navigation Menu:

<div id="LoadPage">
<a id="link1" href="http://domain1.com" target="display">Website 1</a>
<br>

[code]....http://domain1.com

View 5 Replies View Related

Perform A Find In Page Search That Looks At A Specific Link, Opens The Page In A New Window?

Mar 29, 2011

It is possible to perform a find in page search that looks at a specific link, opens the page in a new window and finds the text within that document?? Basically I regularly use an html page in work that has a list of people and their telephone numbers. I want to be able to type in a searchbox on my main page and it open the target page and find the name I am looking for? Is this possible or can you only Find In Page on the same page or another frame?

View 1 Replies View Related

Change Window.location Value Without Loading Page?

Jul 23, 2005

I have a site with dynamic pages, where content is fetched via
a hidden iframe client/server. I'd like to be able to allow
people to bookmark the 'state' of the page, by generating a
URL depending on current content. That URL would ideally be
visible on the location field of the browser, and bookmarkable.

Any idears?

View 1 Replies View Related

Unable To Redirect To The Page Using Window.location ?

Sep 10, 2010

Unable to redirect to the page using window.location of javascript for the code given below

<script language="javascript">
function confirmation() {
var answer = confirm("Do you want to add more Bussess?")
if (answer){[code]....

View 4 Replies View Related

Window.opener.location - Directly Access An Applet In Another Page?

May 24, 2011

In phase of my deployment I send the user a window from a servlet and inorder to communicate with an applet already loaded in another window in the browser I thought I could set the window.opener.location="${formbean.property}"; and it partly works, it get set, I see the new window flash, but it then executes that url. Two questions?

1. setting the window.opener.location in an onLoad() should not force a post back to the server, correct? I am just trying to keep that window I want up there and set an internal property so I can access the applet in the other window. Trying to make this "synthetically" a child of that page opened with the applet so I can call the applets methods simply.

2. Is there another way for a new browser window to directly access an applet in another page? I could go the route of making a probe applet and hoping they share the same JVM, (JRE1.6.0.25) access it that way. Is/how that the way to do it?

View 2 Replies View Related

JQuery :: Ajax - Page Refreshes To A Blank White Page?

Aug 31, 2009

Im doing an Ajax call which calls a Java struts 2 action. This action basically just does a DB update. There is no data being returned to the client. The page refreshes to a blank white page. I dont want his to happen. I want a pop up box on my page. The ajax call happens when i press a save button. Here is the jquery code:

[Code]...

Im a Jquery newbie. As far as I can gather JQuery is expecting data back. It gets nothing back (which is what I want). But Jquery does a refresh with this. Hence why my page goes to a blank white page. I think this is what is happening

I was thinking of putting in my dummy div and loading the blank/empty no html into the dummy div but there has to be a way to stop the white page showing up. I dont get pop up boxes either as shown in code above:

View 2 Replies View Related

JQuery :: Causing Blank Page In ASP .NET Master Page Environment

Jul 20, 2010

I have a page that's built using ASP.NET and using a master page.Page contents shows up for a moment then I get a blank page - when I run it. If I remove the jQuery code from my page - then I get the contents.

I tried putting the following in the master page.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" >
</script>

View 2 Replies View Related

JQuery :: Target A "Cycle #anchor" From An External Page Link?

Sep 3, 2010

I have Cycle "pager" navigation working flawlessly in one of my pages. What i'm trying to do is this:

I'm Attempting to LINK to specific Anchors from a link on a different page.

Example:
// external page link //
<a href="http://www.convertstyle.com/beta/apparel/womens-apparel#shirt1">Headline Womens</a>

[Code]....

View 1 Replies View Related

When Open Page Just Get A Blank Page With Nothing ... Not Even The Form?

Mar 9, 2009

what the code is supposed to do is show my form and update the pb field... the thing is when i open my page i just get a blank page with nothing ... not even the form..

pbupdate.php
<link rel="stylesheet" type="text/css" href="http://www.runningprofiles.com/css/login.css"><?php

[code]....

View 3 Replies View Related

How To Get A Javascript Link To Open In A New Window Like Target=_blank?

Apr 12, 2007

Code:
<a href="#" onclick="window.location='http://YourSite.com'">click here</a>
I want to make it so that it opens a new normal browser window just like target=_blank does.

View 3 Replies View Related

Make Whole Page Send The User After Some Seconds To Another Page And Not Only The Iframe And Parent Location?

Jan 10, 2011

I have an webbpage, and in the middle of it there is an iframe to a php site. So i have used this code, so after some seconds the iframe will send the guest to another page. <meta http-equiv="refresh" traget="_top" content="5 url=http://mypage.com"/> But the thing is that i want the WHOLE page to reload, and go to that page after 5 seconds (we can say). With that code, only the iframe are going to another page. Is it possible to make the whole page send the user after some seconds, to another page and not only the iframe?

View 1 Replies View Related

Add A 'blank' Target To Any Links That Have 'external' Specified In The REL?

Mar 11, 2009

I am using a JavaScript to add a 'blank' target to any links that have 'external' specified in the REL. This is working great, but on some of the links, I need to give the user the ability to click the surrounding <li> item as well.

So my regular link looks like this:

<li><a rel="external" href="http://www.google.com">Google</a></li>
I need to figure out how to add the REL to the onclick in the LI
<li onclick="location.href='http://www.google.com/';"><a rel="external" href="http://www.google.com">Google</a></li>

[Code]...

I can't seem to find any instructions about how to insert this REL option....

View 6 Replies View Related

Clicking On Link Resets Browser Window To The Top Of The Page?

Jan 7, 2010

I have a little tabbed content window that uses jquery and I have an annoying little problem: whenever I click on one of the tabs, the page resets to the top, so if you click on the last tab, you have to scroll down to see it again.

Here's a link: [URL]

If you look at this page in IE, I know, it displays all screwed up. I'm too tired to tackle IE today.

View 2 Replies View Related







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