By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,843 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

Php & ajax

P: 3
how to set setfocus commnd with textboxes in php with Ajax
Feb 1 '12 #1
Share this Question
Share on Google+
4 Replies


Rabbit
Expert Mod 10K+
P: 12,347
You don't do set focus in PHP, you do it in javascript.
Feb 1 '12 #2

P: 3
Then, how to do the same action of set focus in javascript with php or php/Ajax?
Feb 2 '12 #3

Rabbit
Expert Mod 10K+
P: 12,347
You don't use PHP. You just use javascript. In javascript, you just call the .focus method on the form element you want to set focus to.
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("someTextbox").focus()
Feb 2 '12 #4

P: 3
@Rabbit
Thanks for yur information. I will try it and inform you later
Bandula
Feb 3 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.