Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #36140

Re: Setting window "frame" in focus

Newsgroups comp.lang.javascript
Date 2019-03-20 11:32 -0700
References <60b24555-0ee3-4602-b617-5b44d382af98@googlegroups.com>
Message-ID <7412da2e-98fe-4466-ac2f-14873ea38dc9@googlegroups.com> (permalink)
Subject Re: Setting window "frame" in focus
From Jonas Thörnvall <jonas.thornvall@gmail.com>

Show all headers | View raw


Den onsdag 20 mars 2019 kl. 19:17:53 UTC+1 skrev Jonas Thörnvall:
> My script loads two frames, in the main frame "first loaded" there is a character key listener. Unfortunately after the other frame loaded it seem that the main frame no longer in focus. So i tried to figure out howto set it in focus without point into frame with mouse?
> 
> I've tried to point to elements inside frame to get focus to window
> document.getElementById("someElement").focus();
> Gives...Uncaught TypeError: Cannot read property 'focus' of null
> 
> 
> And tried to point to frame  **name**
> myframe.focus(); 
> Uncaught ReferenceError: testing is not defined
Solved using parent.myframe.focus();

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Setting window "frame" in focus Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-20 11:17 -0700
  Re: Setting window "frame" in focus Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-20 11:32 -0700

csiph-web