Questions tagged [window]

In computer science a window is a graphical interface to let a user interact with a program. Questions regarding Microsoft Windows should use the "Windows" tag.

A window is an area of the screen containing controls and other objects controlled by a program. A User can use these objects to instruct the program on what to do and the program can use these objects to show outputs related to user commands. A window is an important part of Operating Systems havin a Graphical User Interface (GUI).

9460 questions
1301
votes
4 answers

Open link in new tab or window

Is it possible to open an a href link in a new tab instead of the same tab? Link
Rene
  • 13,299
  • 5
  • 19
  • 28
722
votes
25 answers

Is there a way to detect if a browser window is not currently active?

I have JavaScript that is doing activity periodically. When the user is not looking at the site (i.e., the window or tab does not have focus), it'd be nice to not run. Is there a way to do this using JavaScript? My reference point: Gmail Chat plays…
Luke Francl
  • 31,028
  • 18
  • 69
  • 91
489
votes
7 answers

location.host vs location.hostname and cross-browser compatibility?

Which one of these is the most effective vs checking if the user agent is accessing via the correct domain. We would like to show a small js based 'top bar' style warning if they are accessing the domain using some sort of web proxy (as it tends to…
anonymous-one
  • 14,454
  • 18
  • 60
  • 84
365
votes
28 answers

Get viewport/window height in ReactJS

How do I get the viewport height in ReactJS? In normal JavaScript I use window.innerHeight() but using ReactJS, I'm not sure how to get this information. My understanding is that ReactDOM.findDomNode() only works for components created. However…
Jabran Saeed
  • 5,760
  • 3
  • 21
  • 37
361
votes
21 answers

How to open in default browser in C#

I am designing a small C# application and there is a web browser in it. I currently have all of my defaults on my computer say google chrome is my default browser, yet when I click a link in my application to open in a new window, it opens internet…
Sean
  • 8,401
  • 15
  • 40
  • 48
350
votes
10 answers

How to increase the vertical split window size in Vim

:vsplit (short form: :vs) split the Vim viewport vertically. :30vs splits the viewport, making the new window 30 characters wide. Once this 30 char window is created, how would one change it's size to 31 or 29? With horizontal windows Ctrl-W +…
molicule
  • 5,481
  • 3
  • 29
  • 40
344
votes
6 answers

window.location.href and window.open () methods in JavaScript

What is the difference between window.location.href and window.open () methods in JavaScript?
masif
  • 3,950
  • 4
  • 19
  • 22
322
votes
3 answers

What's the difference between window.location= and window.location.replace()?

Is there a difference between these two lines? var url = "http://www.google.com/"; window.location = url; window.location.replace(url);
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
308
votes
11 answers

How do I terminate a window in tmux?

How do I terminate a window in tmux? Like the Ctrlak shortcut in screen, where Ctrla is the prefix.
Dmitry
  • 3,861
  • 5
  • 20
  • 21
291
votes
11 answers

Cancel split window in Vim

I have split my windows horizontally. Now how can I return to normal mode, i.e. no split window just one window without cancelling all of my open windows. I have 5 and do not want to "quit", just want to get out of split window.
Sudeep
  • 3,015
  • 3
  • 17
  • 8
225
votes
12 answers

Flutter doctor error - Android sdkmanager tool not found. Windows

I have been going around in circles with this issue, there are so many people who have issues similar to mine, but not one of them is the same. I am trying to get flutter fully set up, but can't resolve one of the issues. When I run flutter doctor…
Mark Perry
  • 2,908
  • 3
  • 18
  • 27
200
votes
11 answers

How do I handle the window close event in Tkinter?

How do I handle the window close event (user clicking the 'X' button) in a Python Tkinter program?
Matt Gregory
  • 8,074
  • 8
  • 33
  • 40
199
votes
15 answers

Fastest way(s) to move the cursor on a terminal command line?

What is the best way to move around on a given very long command line in the terminal? Say I used the arrow key or Ctrl-R to get this long command line: ./cmd --option1 --option2 --option3 --option4 --option5 --option6 --option7 --option8 --option9…
Frank
  • 64,140
  • 93
  • 237
  • 324
191
votes
4 answers

$(window).scrollTop() vs. $(document).scrollTop()

What's the difference between: $(window).scrollTop() and $(document).scrollTop() Thanks.
frenchie
  • 51,731
  • 109
  • 304
  • 510
171
votes
9 answers

Is it alright to use target="_blank" in HTML5?

I recall reading somewhere that in HTML5 it was no longer okay to use target="_blank" in HTML5, but I can't find it now. Is it alright to continue to use target="_blank"? I know it's generally considered a bad idea, but it's by the easiest way to…
Darryl Hein
  • 142,451
  • 95
  • 218
  • 261
1
2 3
99 100