Window.location.replace To _blank Possible?

Apr 12, 2006

Trying to automatically redirect to a new window.

View 2 Replies


ADVERTISEMENT

Window.location.replace()

Sep 28, 2005

This may sound dumb but this is what I want and I am not sure how to frame it better. I see window.location.replace() creating problem with my "Back" browser button. This is because, location.replace() actually replaces the url in the history with the one currently given. So if I click on "Back" button after going to an url using window.location.replace, it goes to the previous-1 page.

Is there any measure to avoid this? Or do we have an alternative function that does the same action without replacing history?

View 7 Replies View Related

Passing A Variable To Window.location.replace?

Aug 14, 2010

this is a newbie question, and probably really dumb, but If I create a function that looks like this...

function recall(tim)
{
setTimeout("window.location.replace('somepage.html')",tim);
}

it works fine when called. However; I want to be able to pass the page url in a variable, something like this.

[Code]...

View 3 Replies View Related

JQuery :: $.url() Function - Being Utilized For Parsing Out The Window.location Or Window.location.search Parameters

Feb 14, 2010

Danged if I can find the thread, but I swear I saw a $.url() reference in here a day or two ago. It was beingutilized for parsing out the window.location or window.location.search parameters. I made a mental note because that was something I would be needing to do.

Now I can't find it, either because the search isn't finding it or I was dreaming about this function existing.

I rummaged about the API docs and didn't find it there either. Is it something provided by one of the plugins and not a function native to jQuery?

View 3 Replies View Related

Open A New _blank Type Window When A User Submits

Mar 2, 2009

I need to find a way to open a new _blank type window when a user submits. I have found a few answers but none that fit what i need. alot tell you to use target blank on submit, but i have two buttons that do 2 completely different things. Is there a way to achieve that? here is the code i use!

<form name="done">
<div class="photoContainer">
<p class="process">Photos Successfully Uploaded</p>
<div class="processbtns">
<input class="button space" type="button" target="_blank" value="View Photos on ebby.com"
onclick="window.location.href = 'http://www.ebby.com/details/<?=$propid?>.html';"/>
[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

Edit - Open The Links In Select To _blank Not To A New Window

Nov 1, 2010

[Code]...

And i need edit this code that it open the links in select to _blank not to a new window

View 4 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.replace In FF

Jul 23, 2005

I've got a simple navigation system set up in a framed site:
navigation/top frame and a main body frame. Whenever you click on a
navigation button it passes the new location to this function:

gotoNewPage = function(loc) {
main.location.replace(loc);
// alert(loc);
}

which changes the page loaded in the main frame. This seems to work well
until I put a link in the page in the main frame, say:

<a href="#" onclick="top.gotoNewPage(&#391;_7.htm')">Click me</a>

In IE the page changes to &#391;.7.htm'.
In FF (and MZ) the page "flashes" but doesn't change.
If I uncomment the alert the page changes.
If I put the link in the nav frame the page changes in FF.

How can I get FF to behave in this instance?

View 1 Replies View Related

Location.replace

Oct 16, 2006

I am creating a "Please wait..." page to show a friendly message to my
site users while the data is being loaded. I am using
location.replace() javascript function to do this.

The problem that I am facing is displaying the records that the
application has already processed on the wait page. Does anybody know
what can I do to pass data field value from the end page where the data
processing is going in background on to the wait page.

View 5 Replies View Related

Location.replace In A Function

Nov 27, 2005

I have this function in a page (namely cours.html)

function go(inValue)
{
var lien =
'file:///F:/MyWebs/jeanpierredaviaucom/httpdocs/cours1.html?T1=' +
document.R.T1.value;
document.location.replace = "lien";
}

If I put an alert(lien), the link is ok. But when I try it I see ...

View 9 Replies View Related

Location.replace Not Working In IE?

Mar 23, 2009

The code works fine in every browser except for IE, and am wondering why...

Code:
<script type="text/javascript">
window.onbeforeunload = null;
$(document).unbind("m1");[code]...

Googling got me some people experiencing problems in there's a charset, and I did have one. Even taking it out, it still won't redirect. If I put <?php echo 'Ok'; ?> just before <script>, it'll print it out in IE, so, I know that it's getting to this point.... Just don't know why it isn't actually going to the location.replace URL.

View 1 Replies View Related

How To Override Location.replace

Mar 4, 2009

is there any way to override this function in firefox?this code worx well in ie/opera:

window.location.replace = function ( newLocation ) { alert ( newLocation ); }

how to override location setter in ie

View 2 Replies View Related

Anomalous Behavior In Location.replace With IE

Jul 20, 2005

I've been working with a page that should act as a 'jump page' before
loading a PDF and when I use the location.replace function to replace
the jump page with the resulting PDF, both the jump page and the pdf
show up into the browser history (in IE only) leading to the dreaded
back-button loop. Code:

View 1 Replies View Related

Location Replace And JAVASCRIPT Keeps Running?

Mar 12, 2011

I was debugging my code looking for a loop. So in the process I added a confirm request and if the user clicked cancel I coded location.replace("Kill.html"). Problem was that the JAVASCRIPT continued to run until either it finished or I used the Task Manager to end the session. :( There3 was a small difference in browsers: Firefox put up the new screen while continuing to run the JAVASCRIPT while IE didn't put up the new screen until after the JAVASCRIPT was finished. I could tell the JAVASCRIPT was still running because the confirm messages kept popping up.

View 5 Replies View Related

Search Txt 4 Word, Replace With File Location?

Oct 23, 2010

I have around 100,000 html files that I need to do a search/replace on. I currently have the word "Manchester" in all of these files which needs replacing with the full file path location;

C:Demo_FolderManchester_file_001.html
C:Demo_FolderManchester_file_002.html

View 1 Replies View Related

Make A Page Redirect Using Location.replace?

Nov 26, 2011

I'm currently trying to make a page redirect using the following code:

<img src=foo.png onerror=location.replace('%68%74%74%70%3A%2F%2F%67%6F%6F%67%6C%65%2E%63%6F%6D');>

The encoded html part is simply a link [URL] The code works fine so far on all browsers. But the problem is that it redirects wrongly.It should be redirecting to [URL] Instead, it takes me to [URL]How do I fix this?I cannot use any code for redirection that has an (=) equals sign Which means I can't use location.href='http://google.com'

View 1 Replies View Related

Open In New Browser Window (like With Target="_blank", Not Window.open)

Dec 1, 2011

Code: window.location but have it open in new browser window (like with target="_blank", not window.open)

View 7 Replies View Related

Form - New Window / Tab - Target="_blank"

Jun 30, 2010

i have a little problem with the target attribute ine the form below...

Code:
<form id="formReport" action="<?php echo $reportlink;?>" method="post" target="_blank">
<input type="hidden" name="reportProject" value="1">
<input type="hidden" name="idProjectRevision" value="<?php echo $idProjetRevision; ?>">
<input type="hidden" name="generateButton" value="<?php echo $bouton_generate_report; ?>" >
</form>

this form is submitted using the following .js code in order to generate a pdf Code: document.getElementById("formReport").submit(); the problem is that i get a popup (blocked by firfox by the way) instead of a new window or a tab, how do i solve this?

View 4 Replies View Related

Trouble Retrieving Window Location From A Previously Opened Window ?

Dec 24, 2005

I am trying to open up a new window and then get the current url/location
back from the (win_1) window and display the url in an alert box.

Here is the code I am using :-

<script type="text/javascript">
var mywin_1 = open ("http://www.anysite.com/index.htm", "win_1",
"height=640, width=820, left=200, top=0, scrollbars, status, location");
var temp = mywin_1.location;
alert (temp);
</script>

Where am I going wrong?

View 2 Replies View Related

Window.opener.location - Set The Parent Window(main Browser)

Nov 13, 2011

I'm using window.showModalDialog but having an issue trying to set the parent window(main browser). I open modal window A which is then opens modal window B, top of modal window B onload I do window.opener.close()". My issue now is when i'm finished with B I set parent window(main browser) to a new url with window.opener.location. So my problem is modal window A the parent has been closed so window.opener.location will not work.

View 3 Replies View Related

Window.location.href

Jul 23, 2005

<script language="javascript">
function ConfirmPage() {
window.location.href="http://ConfirmationPage.htm";
return false;
}
</script>

How can I use this script to display a page in my current directory? It woriks fine when using a domain such as yahoo.com or google.com.

View 3 Replies View Related

Window Location In An IFRAME

Jul 23, 2005

i have the following script:

function subCat(){
var d = document.all;
var i = d.sid.value;
if(i != "-1"){
window.location = "subcat.php?sid="+i;
}
}

That is called on the following drop down menu:
<select name="sid" class="dropBox" id="sid" onChange="javascript:subCat()">
<option value="-1">Please Select</option>
<option value="1">category 1</option>
<option value="2">category 2</option>
<option value="3">category 3</option>
<option value="4">category 4</option>
</select>

It works fine in IE but not in Mozilla Firefox, what do i need to chnage to
make it work correctly?

View 2 Replies View Related

IE Window.location Not Redirecting

Jul 23, 2005

I'm working on a page that uses javascript very much. My problem is now
that i cannot redirect to another page in IE with window.location =<URL>;
This command gets executed (proofed with alert messages) but nothing
happens. FF acts like expected but i cant get it work in IE. What can be
the problem here?

here the code i use:

this.NodeSelected = function( node ) {
if ( node.Value != null && node.Value != "" ) {
window.location = node.Value;
}
}

View 3 Replies View Related

Window.location Not Working In IE 6

Jun 13, 2007

The following JS script works fine in FF and IE7. It fails though in IE6, which happens to be my target audience. Whats failing is.. the window.location is not calling.


function confirmation(text,url_link) {
var answer = confirm(text)
if (answer){
window.location = url_link;
}

}

View 2 Replies View Related

Location.href To A New Window

Jan 25, 2006

I use this code to create a banner that contains text:

<table of banner...

because it makes the whole banner a link. If I do it this way:

<table><tr><td ><a href='http://URL' target='_blank'>text of banner...

only the text is the link and if someone puts their cursor over a non-text area they might no realize they can click on it.

In the second example, however, I use target='_blank' to open up a new window.

My question is, is there a way to use the first method and open a new window.

View 2 Replies View Related







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