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


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

Window.location.replace To _blank Possible?

Apr 12, 2006

Trying to automatically redirect to a new window.

View 2 Replies View Related

Way Of Passing Variable From Parent Window To Popup Window

Jun 27, 2002

I need the most efficient way of passing a variable from a parent window to a popup window.The reason i say "most efficient" is because i currently do it like this from the parent:[code]But this is inefficient because at times it randomly alerts "undefinded".Anyways, can someone tell me a more fail safe way to pass a var to a popup so that i will be able to access it 100% correctly.

View 1 Replies View Related

Iframe Window.location As A Global Variable - String

Oct 18, 2010

I have come up with form which pulls membership id, allows checkbox selections and commentry (custom feedback). The final piece that needs to be captured is the iframe's url. Now the content in the iframe is content produced by (madcap) flare.

I need to capture the window.location of the iframe url and pass that onto the asp.net masterpage. The iframe is also located in a content page. The iframes content is controlled by it's own TOC. I have added a script to this output so that each time the content (page) in the iframe changes the script alert's me of the new URL of the page just clicked/opened (this is the information I need passed as a variable).

Here is the code producing the desired alert output (page url).

Code:

The above produces the output I would like to capture (but instead of an alert output, I require this as a string) which will allow the insertion into my form as the final piece of information required.

I am not sure how I can convert or catch the output. Of course I would not want to use the alert function everytime the page changes, but would like to have the window.location bound to a string which I can then use when inserting into my codebehind sql statement.

All the captured data is being inserted using vb.net into a sql table.

I just need to make that content page > iframe (window.location) a global variable that my masterpages codebehind can inject into the INSERT SQL statement.

View 11 Replies View Related

Pass Value With A Variable In Window.location Not Working In Firefox

May 6, 2011

I have this [code]...

It works perfectly fine in IE but it won't work in firefox. Both link and var does not appear in the URL when I get to index.php.

Can anyone explain why? How is it not working in firefox?

View 1 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

Passing Variable Into Parent Window Textbox

Jun 25, 2005

i have a form that will pass the value of a child window listbox choices to a parent window, and also the hidden value (via a variable) of the choices in the child window listbox will appears also in the parent window textbox when i hit the submit button in the child window, and the values of the listbox are taken from a acess database, the form works very well, except when i added the following line to my child window: PHP Code:

<SCRIPT TYPE="text/javascript" SRC="filterlist.js"></SCRIPT>

the hidden value in the listbox of child window wont appear in the textbox in the parent window, when i added the above line.

the above line function as a filtering to my list in the child window, and it is the main part of my code. when i removed the above line, the passing of values to parent window will works fine, except that the filtering function will not work anymore, but i want it both to work, but have no luck. Code:

View 1 Replies View Related

Passing An Increment Variable Into A Window.open Page?

Mar 25, 2010

I have a variable with a number value. I use variable++ to increase the value of the variable. How can I pass the new varible into a new window opened with window.open?

View 8 Replies View Related

Passing A Variable Within A Document.ready Function Into Inline Modal Window?

Apr 27, 2011

i'm using a jQuery Inline Modal Window. the code for it can be found here

[URL]

i currently have an array within a function in javascript. when i click on the appropriate link for the inline modal, the inline modal window appears.

my function looks something like this

function match_all_groups(){
var pop_up_status;
var match_groups = new Array();
var match_groups_count = 0;

[Code]....

i want to receive values from match_groups and display them in my inline modal window. do u know how this can be done?

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

Passing/using Document Location

Aug 5, 2009

Im currently creating a Table with 2 frames (table in top, last row clicked in bottom)

<html>
<frameset rows = "60%, 40%">
<frame src = "table_driver.php" name = "A" id = "FRAME1">
<frame src = "bottom_row.php" name = "B" id = "FRAME2">
</frameset>
</html>

In bottom_row.php I have one object, a [obj = new TableData()]. onClick of a row in FRAME1, obj is initialized to what was clicked and the row is changed.

anyways currently I have it working but want it such that it can work with multiple frames, with a location parameter.

this is currently what I have

function TableData(headers, row, loc)
{
this.headerArr = headers;
this.rowArr = row;

[Code]....

View 2 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

Setting Variable Equal To Php Variable By Passing A Parameter?

Aug 12, 2011

Code:I am having problems with the following. I am wanting to hide <tr> in my table (employees) and only show employees that are in the selected department (selected via dropdown box).I need to set a javascript array to a php array. I am looping and assigning the array and am wanting to pass a javascript variable as the index in php array. I have marked my problem lines in red. Thanx for any help.

<script type="text/javascript" >
function display_elements()
{
var departments = new Array;

[code]....

View 1 Replies View Related

Passing Variables From One Window To A Newly Opened Window

Jan 3, 2011

Here is the program: [URL] Basically, I want to input a number in the input box, which assigns a number to the variable numval located at document.box1.b1. When clicking on the "new window" button, an alert displays the input box value, then another window opens and displays the integers 1 through 12 and the amount squared.

I would like the new window to obtain the number from the previous window so that the new window will display integers (and their squares) from 1 to the value of numval.

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







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