Location.href :: Pass Values From One Page To Another?

Feb 25, 2010

every time i try something it doesn't work for me :( god why is this javascript so hard to make it work... anyway, i just followed the guidelines to pass values from one page to another using ? and it simply, like always, DOES NOT work .

<HEAD>
...
...

<script type="text/javascript">[code].....

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

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 Document.location.href To Direct To A Non-existant Page

Oct 14, 2011

I'm trying to create a player stats page, for my gaming server. I spoke to a guy who knows a little about javascript, and he told me there's a way to use document.location.href to direct to a custom page URL.

For example, if I search for a name, and the results are displayed. I want to click the players username, and be directed to. [url] without the "username.html" actually existing.

I heard it's possible, and it would save me a lot of time because I don't want to have 20,000+ individual pages, one for each username.

View 1 Replies View Related

Can I Pass The Name Of A Javascript Function To A Page Opened With An Href

May 26, 2007

I'm not sure whether or not this is possible, but I want to have control over the Javascript function that is called when a target web page is opened (ie as the onload function in its <body> tag). In other words, the calling page will have several <a href ...> tags referencing the same page, each specifying a different onload function. Is it possible to effectively pass a parameter in this way? I have not been able to find any solution to this.

View 2 Replies View Related

Pass The Values Of The Images Across To The Page Via Post?

Mar 21, 2011

I have code at present which allows me to select images on a webpage.

<img name="img5">
<img name="img4">
<img name="img3">
<script>

[Code].....

I have a simple HTML form which has checkboxes next to images. What I want to do is select one or more images press submit and on the next screen show the images which had checkboxes selected.

I can pass the values of the images across to the page via post but how would I declare the id into img name as the above example is hard coded?

View 3 Replies View Related

Location.href

Feb 17, 2006

I have a couple of links of which I change location.href for tracking purposes.

The problem is that the links now no longer seem to open in a new window (which was accomplished using target="_blank")

Is this an error on my part or is this by design? Is there a workaround? I would prefer not to use window.open as that could get blocked by a popup blocker.

View 3 Replies View Related

Location.href Caching And ASP

Jul 23, 2005

I'm passing the asp parameters using the url current page is files.asp and I'm using window.location.href=files.asp?action=deletefile to pass the action to the serverside

My code never got executed (like the page was cached) unless i put document.write("") before the window.location directive.

Here's the code:

function confirmDelete(x){
var potvrda=confirm("Kliknite OK za brisanje. Cancel za povratak.");
if (potvrda==true) {
trans="files.asp?action="+x;
document.write("")
window.location.href=trans;
}
else {}
}

View 9 Replies View Related

Location.href And Onload

Jul 23, 2005

I'm trying to use the onload event to load a series of urls.
What I find is that the onload function is only called one time
no matter how large the array. Here is the onload function.

var next_win = 0;
var win = window.open("", "", "");
function nextWin() {
if (next_win < urls.length) {
win.
win.location.href=urls[next_win++];
}}

Is this correct behavior?

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

Javascript Location.href

Oct 5, 2005

i have a really stupid problem with this line of code:
location.href = "showreport.php?id=" + sText;

sText is an id of a job that's running on the server.

Showreport.php retrieves the job and outputs the result in HTML. At the same
time job is removed from the server.

What happens is that some browsers (IE 6 mostly) like to GET the
showreport.php TWICE. Of course the second time there is no job any more and
the result returned is of zero length, which is very unpleasant ;-)

Headers sent by the browsers are (1st call):
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, */*
Accept-Language: sl
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322)
Host: veliswork
Connection: Keep-Alive
Cookie: PHPSESSID=tsghl22ijg4f6ba7a2mthggun6

Headers sent by the browsers are (2nd call):
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322)
Host: veliswork
Connection: Keep-Alive
Cookie: PHPSESSID=tsghl22ijg4f6ba7a2mthggun6

Note the Accept tag.
What's even more interesting, the accept tag of IE 6.0 that does not request
twice is:
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*

Note the (still) absent application/pdf, which is the target content here.

Can somebody explain to me, why two calls and if that can be prevented. I
can reduce the problem by keeping the job for another minute or so, but
these jobs tend to be rather large (>10MB RAM usage) when large reports are
generated.

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

Location.href On Non-ie Browsers

Jan 14, 2004

I have a problem with a simple link on non-ie borwsers. This is my link:

<a href="#" onClick="window.location.href('http://www.html.it'); return false;">link</a>

I'tried with and within "window", with and within "return false" but it didn't run..

Do you have any idea or suggestion?

View 3 Replies View Related

Url = Parent.location.href;

Feb 19, 2002

Code:

url = parent.location.href;

Why does that not work? adding that line gives me a javascript error of some sort in IE. I see nothing wrong with it. Yet if I take that out I don't get the error, if I put it in I get the error.

Its in an IFRAME by the way.

View 5 Replies View Related

Mimicking GET With Location.href?

Aug 25, 2010

How to mimic the GET method out of a url, example: [URL] how to retrieve word with the variable location.href

something that retrieves the letters after '?r=' on the variable.

View 6 Replies View Related

Window.location.href On Mac Browsing IE

Aug 11, 2005

why window.location.href or window.location javascript functions doesn't
work on mac browsing IE

View 1 Replies View Related

How Window.location.href() Works?

May 23, 2006

as i know href is a property of location but location.href(url) works
fine with IE 6. i couldn't figure out how its possible? is it a kind of
browser syntax-tolerance helping it to work? how the heck is this
working?

View 8 Replies View Related

Window.location.href With Encode?

May 17, 2007

I have a pop up window, that window needs to refresh the parent window when opened, I'm doing the following:

window.opener.location.href(window.opener.location .href);

problem I'm having is that the parent url has a # sign in it, like:
http://localhost/mysite/me.html#01

i need the #01 to stay in the url after the refresh, anyway to do
this? i tried using escape(window.opener.location.href) but that
didn't work, as it escaped everything including the :// in http://

i also tried:
window.opener.location.href(window.opener.location .protocol + "//" +
window.opener.location.hostname + window.opener.location.pathname);

problem with that was i lost the #01 in the url, pathname didn't
include it.

View 5 Replies View Related

Self.location.href Not Working In Safari?

Feb 11, 2010

Ok I have tried and tried and cannot get this code to work in safari or google chrome.

Basically I am working on a shopping cart. The user will click the paypal pay now button. The form is submitted to paypal via a new window target="_blank"

I also need to refresh the current page. This will write shopping cart data to DB via php upon page refresh.

Safari and google Chrome will open the paypal window, but seems to ignore the javascript to refresh the browser.

FF and IE both work fine.

<script LANGUAGE="JavaScript">
function newPage() {
self.location.href='https://www.artists2you.com/s/orderconfirm.php?ordernumber='.$_SESSION['ordernumber'].'';

[Code]....

View 2 Replies View Related

Location.href Within OnClick Event

Jul 20, 2006

I am creating a send to a friend link on my site. The link will open a pop up window, which contains a form.

I have a function that opens the centered pop up window, and it is called like so (the function declaration resides in an external script):

Code:
onClick="newWindow('http://www.mysite.com/send.php','',âÆ',ò“','')"
I now need to append the current page's URL to the end of the URL ike so:

onClick="newWindow('http://www.mysite.com/send.php?page=xxx','',âÆ',ò“','')"
This is sso that I can then use PHP in the pop up toget the variable from the query string.

I know that I can use location.href to get the current page url, but am not sure how I would include it in the onClick.

I have tried the following:

onClick="newWindow('http://www.mysite.com/send.php?page=location.href','',âÆ',ò“','')"
but that doenst work...

Has anybody got any ideas?

View 3 Replies View Related

Accesskey & Document.location.href

Dec 7, 2006

Is there any way to get 'accesskey' to work with document.location.href?

I'm using a set of functions as link generators and this is what I'm "stuck with" using.

View 3 Replies View Related

Window.location.href Is Not Working In FF?

May 11, 2010

fixing window.location.href on localpath is not working in Firefox only but working fine in IE.

View 1 Replies View Related

How To Delay Window.location.href

Dec 8, 2009

I guess this is an easy question for all javascripters but I don't know how to manage (I'm pretty fresh with JS). I found two solutions on this forum but it seems that they don't work(?).I want to delay for few seconds window.location.href="destination_site.html" before it will automatically take visitor to destination site. It has something to do with setTimeout but I would be greatful for posting a fixed code.

View 3 Replies View Related

Location.href Change & ScrollBy Problem

Jul 23, 2005

I need to change the location of the parent window and after
that scroll a little bit (because of "position:fixed" css buttons,
which obscure the title).

I have
window.opener.location.href = "newhreflabel";
window.opener.scrollBy(0, -25);

The newhreflabel may point to the same document or load
a new one (another chapter).

There is a problem is with timing, T think I need to
serialize those two instructions.

However, the window.opener.document.onload does not seem to
be trigered by href change. Is there any other way how to
do it - or I have ti all wrong?

View 1 Replies View Related

Window.open Location.href Frame

Jul 20, 2005

I have a page of 2 frame:

menu (menu.php)
corpo (corpo.php)

In menu.php i have:

View 4 Replies View Related

Include "location.href = URL In A Function?

Aug 28, 2010

I am so lost with JavaScript functions. How do you include "location.href = URL in a JavaScript function?

View 2 Replies View Related







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