We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Something like google

I am designing a search engine and I want to design it in a way that when user comes to the website the cursor should be already on the search bar. Right now the user needs to hit a tab or manually initiate cursor into the search bar. Any ideas how I can do that?

2
Contributors
3
Replies
8 Hours
Discussion Span
1 Year Ago
Last Updated
4
Views
Question
Answered
s0bigg
Light Poster
25 posts since Aug 2011
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

in a page load event, write YourTextbox.Focus() in !isNotPostback code block.

[This is for Asp.Net C#, please see other syntax for VB.Net]

sufyan2011
Junior Poster
166 posts since Dec 2011
Reputation Points: 9
Solved Threads: 22
Skill Endorsements: 0

To implement it in JavaScript please see following example:

http://diovo.com/2009/04/javascript-better-way-to-set-focus-in-page-load/

sufyan2011
Junior Poster
166 posts since Dec 2011
Reputation Points: 9
Solved Threads: 22
Skill Endorsements: 0

Thanks! It worked..

s0bigg
Light Poster
25 posts since Aug 2011
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
Question Answered as of 1 Year Ago by sufyan2011

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0597 seconds using 2.66MB