href « window « Javascript HTML CSS Q&A

Home
Javascript HTML CSS Q&A
1.animation
2.audio
3.background
4.browser
5.button
6.canvas
7.checkbox
8.Cookie
9.Development
10.DIV
11.dom
12.dropdown
13.editor
14.element
15.Event
16.Firefox
17.flash
18.font
19.Form
20.frame
21.hide
22.hyperlink
23.IE
24.iframe
25.image
26.innerHTML
27.json
28.layout
29.Library
30.localStorage
31.Menu
32.mobile
33.onclick
34.popup
35.Render
36.scroll
37.scrollbar
38.svg
39.tab
40.table
41.tag
42.text
43.TextArea
44.TextBox
45.validation
46.video
47.window
48.xml
Javascript HTML CSS Q&A » window » href 

1. Condition to test if a word exists in window.location.href    stackoverflow.com

I want to test if a word ["sublanguageid-all" to be specific] is present in the current address of the page using an 'if' condition. I've tried /sublanguageid-all/g, but I'm not able to ...

2. window.href for all browser    stackoverflow.com

How can i replace window.href="someurlhtml" for firefox and IE support ?

3. window.location.href opens another window    stackoverflow.com

For some reason when I set window.location.href = it opens another window. window.location.href = 'https://MyDomain.com/Checkout/Purchase.asp'; It doesn't happen in my development environment, only production. The only only thing different that ...

4. How t make a href="#top" from iframe to parent window    stackoverflow.com

I using parent window and one iframe my html code is given below Page1.html

    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    ...

5. Javascript: Setting window.location.href versus window.location    stackoverflow.com

When would you set window.location to a URL string versus setting window.location.href?

window.location = "http://www.stackoverflow.com";
vs
window.location.href = "http://www.stackoverflow.com"
Reference: https://developer.mozilla.org/En/DOM/Window.location

6. Difference between window.location.href=window.location.href and window.location.reload()    stackoverflow.com

What is the difference between window.location.href=window.location.href and window.location.reload() in JavaScript?

7. Proper encoding of href for window.open() in JavaScript    stackoverflow.com

What is the proper cross-browser encoding for the href when using window.open() in JavaScript? First I was using

var href = "http://127.0.0.1:8000/etf/admin/escola/t34atividade/?pop=1&copy=1";
var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
IE8 opens: http://127.0.0.1:8000/etf/admin/escola/t34atividade/?pop=1©=1 FireFox opens: http://127.0.0.1:8000/etf/admin/escola/t34atividade/?pop=1&copy=1
var ...

8. How can I set existing HREF links to open in a new window with javascript    stackoverflow.com

[edit] I am NOT using jquery in this app. Looking for a way to force preexisting links to open in a new window. But I only want to Apply this behavior to ...

9. window.href open new window?    stackoverflow.com

window.location.href=//some url
it always open a new window, this only happens when the parent window is an dialog box. Any idea what i did wrong? i tried using
window.open("http://asdf.com", "_self");
as suggested on this ...

10. JavaScript: 2 window.opener.location.href statements with alert() in between not functioning    stackoverflow.com

I need to make a little JS app to scroll automatically through a list of URLs. I've chosen to have the functionality in a pop-up, for various reasons. The syntax to ...

11. How to pass 2values to window.location.href    stackoverflow.com

I have a script in which I have to pass 2 values to window.location.href to open a new window which accepts these two values from the URL.

onclick="showrestdetail($urlpagename)"
The function is ...

12. window.location.href not working in Safari    stackoverflow.com

Why won't this work in Safari?

<script language="javascript" type="text/javascript">
function changeUrl(url) {
  window.location.href='http://google.com';
  return false;
}
</script>

<form action="#" onsubmit="changeUrl(this)" />
  <input type="Submit" value="Go" />
</form>

13. window.location.href in firefox    stackoverflow.com

can you please tell me how to use window.location.href in firefox ?

14. mocking window.location.href in Javascript    stackoverflow.com

I have some unit tests for a function that makes use of the window.location.href -- not ideal I would far rather have passed this in but its not possible in the ...

15. window.open target _self v window.location.href?    stackoverflow.com

I need to redirect the user using JavaScript. Which is the preferred method?

window.open("webpage.htm", "_self");
or
window.location.href = "webpage.htm";

16. bug window.location.href + hash in Safari?    stackoverflow.com

I have a script in my JavaScript file where I need to open a new file with a hash already set, something like:

function search(queryString){
    window.location.href = "dosome.php#" + ...

17. Problem with opener.top.location.href on second post-back    stackoverflow.com

I have a page with several Iframes, I open a popup with a form in it from within the iframe and the popup needs to refresh the opener.parent when the form ...

18. Window.open + href replace and pop into new window but not using target _blank    stackoverflow.com

i'm stuck on something where i want the Test 1 and Test 2 links to pop-open in a new window, not target=_blank into a new window so the pop-up doesn't open ...

19. window.location.href not working :(    stackoverflow.com

So i have a form, and onsubmit="return reg_check(this)" where reg_check() is a javascript function in the header which is supposed to check the form data, and since one of its tasks ...

20. Is there any difference between window.location and window.location.href?    stackoverflow.com

Possible Duplicate:
Javascript: Setting window.location.href versus window.location
When I tested these code in browser, it seems like they are same. Is there any difference?

1

window.location = "http://stackoverflow.com";

2

window.location.href ...

21. window.opener.location.href not working in IE 6    stackoverflow.com

window.opener.location.href = newUrl not working in IE 6 I want to refresh my parent window from popup window to some different URL, But above javascript code is not working. Please let me ...

22. Why does window.location.toString() report the same as window.location.href?    stackoverflow.com

The window.location is an object. But when you execute window.location.toString() it converts the object to the equivalent to window.location.href. My question is how? And can I set up objects to a similar ...

23. javascript substr window.location.href    stackoverflow.com

this is a very beginner question but I don't know javascript, I only wants implement a snipplet I found googling around. The original code is:


var langcodes=["it", "es"];
var langCode = navigator.language || navigator.systemLanguage;
var ...

24. window.parent.location.href IE9 Bug?    stackoverflow.com

Scenario:

  1. domain1.com hosts an iFrame of domain2.com.
  2. domain2.com is using javascript to trigger dynamic links that need to route to the parent window.
  3. The links are all relative paths.
  4. Clicking on /linkA.html (in iframe on domain2.com) ...

25. window.location.href = window.location.href and JSLint    stackoverflow.com

If using

window.location.href = window.location.href;
to reload a page (without re-POSTing) is not bad practice, what should we make of JSLint's "Weird assignment" complaint? EDIT window.location.reload() is not suitable when you don't want to ...

26. JavaScript inside 'a' href in IE    stackoverflow.com

I would like to use HyperLink of ASP.Net to open a new window when I click on it. I can not hard code the NavigateUrl, instead I have to use 'onclick' ...

27. Window.location.href () and Window.open () methods in JavaScript    stackoverflow.com

What is the difference between window.location.href () and window.open () methods in JavaScript?

28. How to auto start a a href="javascript:void window.open( open loading    stackoverflow.com

<a href="javascript:void window.open('website', 'pukarock', 'width=1018, height=715, scrollbars=yes, resizable=yes');">click me</a>
How do you auto start this in HTML as onload? Other stuff I researched doesn't work. I only want my website to open ...

29. window.location.href does not work in IE8    stackoverflow.com

I have to scroll up in a page. Therefore I put a an anchor at the correct place and then I did

window.location.href = 'http://example.org/#anchor';
This works fine with FF, Chrome, Safari and ...

30. Unable to find href of new window using javascript    stackoverflow.com

I am using below mentioned script to get href of new opened window, but its not working Browser FF 7, IE 9, WIN 7 Can someone please let me know what's wrong ...

31. js if window.location.href not match, then jump to    stackoverflow.com

How to make a window.location.href judge? if window.location.href not match ?search=, make the current url jump to http://localhost/search?search=car my code not work, or I should use indexOf to make a judge? Thanks.

if(!window.location.href.match('?search='){
  ...

32. Window.location.href giving a flick in IE8    stackoverflow.com

I am opening a excel file with javascript using window.location.href('URL'); It is working fine in Firefox, Safari, but in IE8 it is showing a blank screen and then a file dialog. What's ...

34. how to delay window.location.href?    codingforums.com

35. location.href to new window    codingforums.com

36. window.location.href fails in Firefox    codingforums.com

this page in firefox get me a blank page. please help me! Code: "; What I want to do is pass a variable to checout2.php when it is called ($Email) . How do I do this or can I do this with this command? thanks

46. [SOLVED] window.location.href problem    devnetwork.net

47. window.location.href    phpfreaks.com

48. [SOLVED] window.location.href error 404 in IE 6 & 7    phpfreaks.com

Thank you for your replies. Tried taking out the .href and IE still showing 404 error page not found. This code has been working for years in Firefox and up until recently was working in Internet Explorer. How it works, When you click Add to the cart button, it just shows the same page and adds the product to the cart. ...

50. Please help with "window.location.href"    sitepoint.com

53. Should I use location.href or window.location.href or window.location ?    sitepoint.com

If you have access to the server-side code, such as PHP, you can use the 'header' function to redirect. In PHP, document.location.href is what I've typically used and haven't had any problems with browser compatibility. If you change the document location, it will abort script processing since you're moving to a new page.

54. Can't get window.location.href to work in some browsers    sitepoint.com

Hi dc dalton, I cut down the code and made things confusing. The web page displays a form. If the user wants to they can complete the form and click the Submit button. If they don't they can click "Cancel" to pushed to another page. That was me testing...ultimately I will be producing some code like this: There is a record ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.