Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 31-10-2009
Member
 
Join Date: Jun 2009
Posts: 441
Switch to active web page on website

I'm managing a site with a member's area. I wish that when connecting to index.php we can enter it directly into the input of the login form. No one is required to click on the entry fields. Is this possible? Can go directly to login form page after connecting to index.php? I hope I was clear.
Reply With Quote
  #2  
Old 31-10-2009
Member
 
Join Date: Nov 2008
Posts: 1,192
Re: Switch to active web page on website

Your input must be of a few more javascript attributes

HTML Code:
<input type="text" id="login" onload="this.focus();" />
Reply With Quote
  #3  
Old 31-10-2009
Member
 
Join Date: Jun 2009
Posts: 441
Re: Switch to active web page on website

Oops, I forgot to say that I use the XHTML standard. That means I found my happiness. Here is the code if it can interest someone:

HTML Code:
<html>
<head>
<script language="JavaScript">
function get_focus(field1)
{
document.getElementById(field1).focus();
}
</script>
</head>
<body onload="get_focus('field2')">
<form>
Field 1 <input type="text" value="" id="field1" tabindex=3><br>
Field 2 <input type="text" value="" id="field2" tabindex=2><br>
Field 3 <input type="text" value="" id="field3" tabindex=1>
</form>
</body>
</html>
Reply With Quote
  #4  
Old 31-10-2009
Member
 
Join Date: Nov 2008
Posts: 1,192
Re: Switch to active web page on website

This is strictly equivalent. My version is shorter. Also, your version does the focus when the entire document is loaded. We must therefore wait in the case of a slow connection or slow. In my version, the focus is activated when the input appears.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Switch to active web page on website"
Thread Thread Starter Forum Replies Last Post
Sony Ericsson Xperia active automatically switch off Raju Chacha Portable Devices 6 18-03-2012 09:42 AM
Is it possible to increase the Page rank of website Samaria Technology & Internet 4 19-01-2011 02:26 AM
Why the page rank of a new website is zero? Sheamus Technology & Internet 3 18-01-2011 07:38 AM
How a website looses its page rank Himalayan Technology & Internet 5 17-01-2011 07:59 AM
How can i switch new tab page into Google task Page using Google Chrome? Smita.bendal Technology & Internet 5 11-02-2010 01:03 PM


All times are GMT +5.5. The time now is 09:35 AM.