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


ADVERTISEMENT

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

Document.location.href Or Document.URL

Dec 18, 2002

Which is the better option to use when dynamically loading a page?

document.location.href = "newpage.html"

or

document.URL = "newpage.html"

My book says that Netscape depreciated document.location.href in favour of document.URL, but yahoo are using document.location.href. Also, is there a good online reference (up-to-date) of the DOM which includes stuff like this?

View 6 Replies View Related

"no Such Interface Supported" When Using Parent.frame.document.location.href

Jul 23, 2005

I have some code that changes a PDF file in another frame using:

parent.frame.document.location.href = "PDF File"

This code works fine the first time it is called. But if a PDF file is
in that frame and the code is called again IE gives me an error:

"no such interface supported"

I have used this code for the past 5 years and it has worked fine with
Adobe Acrobat 4-6 it is only 7 that started to cause me grief. It is
only IE that has this problem, Netscape seems to work fine.

I have checked the web and talked to Adobe and have yet to find a
solution.

View 2 Replies View Related

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

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

Direct The User To A Html Document Based Upon Which Option Have Chosen In The List

Feb 26, 2011

In my code, I have the following snippet:

HTML Code:

I want to know how I could direct the user to a html document based upon which option I have chosen in the list (see above). So for example...

If I have chosen '1' in the list (see above), then when I submit the form, I will be directed to a page detailing information related to option '1'. If I have chosen '2' in the list (see above), then when I submit the form, I will be directed to a page detailing information related to option '2' etc.

View 1 Replies View Related

JQuery :: How To Window.location.href Parameter From The <select> Field

Nov 27, 2010

I've got code, but it doesn't href's (redirects) user after changing the <select> value; what I need to fix?:

what I want to open page (make redirect) and to do that I need to ADD to the LINK [url]

[url]

View 2 Replies View Related

JQuery :: Make Menu Link Open Submenu And Go To Href Location

Dec 2, 2010

I have inherited some code that changes the behavior or menu links with submenus to open the submenu but I need it to both open the submenu and go to the link location.

Here is the code:
$('#leftNav #menu li a').click(
function() {
$('#leftNav #menu li a').removeClass('selectedAccordion');
$(this).addClass('selectedAccordion');
$('#leftNav #menu ul.currentnav li a').removeClass('selectedAccordion');
$('#leftNav #menu li ul li a').removeClass('selectedAccordion');
//$(this).parent('li').addClass('selectedAccordion');
var checkElement = $(this).next(); if((checkElement.is('ul')) && (checkElement.is(':visible'))){
return false;
}
if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
if(checkElement.parent().parent().parent().is(':visible')) {
checkElement.slideDown('normal');
return false;
}
$('#leftNav #menu ul:visible').slideUp('normal');
checkElement.slideDown('normal');
return false;
}}

How do I put back the behavior to open the submenu AND go to the link location? I found I could add location.href = $(this).attr('href'); and go to the correct, but then the submenus slideUp and are hidden again. I can't figure out why changing the page closes the menus.

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

JQuery :: Page To Detect And Direct Older Browsers To Use Different Code?

Aug 19, 2011

This should be an easy answers since I am a newbee and never redirected older browsers.For example I am learning JSON now and the below browsers are the only browser that can use the faster and safer JSON.parse parser. older browsers need to use javascripts eval() to parse json files to javascript objects.

[Code]...

View 10 Replies View Related

JQuery :: Handle Non Existant Array Element?

Aug 15, 2010

I have the following array

var arraydata={NOT1NO:{ field1: 'NOT1NO',field2: 'DURcy',field3: 'valuta',field4: 'INF'},NOT2NO:{field1: 'NOT2NO',field2: 'DURcy',field3: 'valuta',field4: 'INF'}};

I easily access parts of the array like arraydata.NOT1NO.field1.

But if for some reason I try to access a part of the array that does not exist, like arraydata.NOT1NO.field22, the whole script stops to function. Is there a way to handle this? For instance:

if (arraydata.NOT1NO.field22 DOESNT EXIST) {do something} else {do something else};

I have tried .length, .inarray but not found a working solution.

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







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