![]() ![]() |
| DeaPeaJay |
Oct 30 2009, 10:35 AM
Post
#1
|
|
Member ![]() ![]() ![]() Group: Members Posts: 92 Joined: 21-September 06 From: East Tennessee - USA Member No.: 191 |
I'm wondering, is it possible to set the focus of the browser to the address bar through the web page?
I'm creating a sort of start page for myself primarily, and eventually others. But when I set the site as my home page, when the browser takes me to the site, the focus no longer remains on the address bar. So if I want to type in an URL instead of clicking on one of the links, I have to manually put the focus back on the address bar. I can hit command L easily enough to do this, but it would be nice if I didn't have to. I can't imagine a web page would have access to the browser on that level, but I was just curious if anyone knew of a way to do this. Here's the site I'm working on: http://whereyouoff.to/ |
| DeaPeaJay |
Oct 30 2009, 11:04 AM
Post
#2
|
|
Member ![]() ![]() ![]() Group: Members Posts: 92 Joined: 21-September 06 From: East Tennessee - USA Member No.: 191 |
You know as I'm thinking about this. I'm beginning to doubt that it's possible. I can set the window.location and get it. But if I were able to manipulate it, that would have security implications I would think. A phishing site for example could modify the browser URL so that it would look you're on a different site than you are. I'm not talking about changing the URL in this case, but being able to set the focus I would think carry with it the abilty to manipulate it.
bummer. I tried setting window.location to "" but that doesn't work either, just makes my browser go crazy trying to load nothing. |
| pandy |
Oct 30 2009, 12:48 PM
Post
#3
|
|
Don't like donuts. Don't do MySpace. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 7,207 Joined: 9-August 06 Member No.: 6 |
I don't think it's possible either, it shouldn't be. But sure I'm not.
-------------------- “Never go to excess, but let moderation be your guide.”
– Cicero |
| Christian J |
Nov 3 2009, 05:08 AM
Post
#4
|
|
¤¤¤¤¤¤¤¤¤ ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 2,371 Joined: 10-August 06 Member No.: 7 |
A workaround might be to put the focus on a text field, then use its value for window.location (when the Enter key is pressed?).
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st November 2009 - 10:37 AM |