mona Posted October 21, 2005 Share Posted October 21, 2005 Iam using php and html I don't want to use javascriptcan u give me a function in php that set a focus to a certain input text.I know how to write it in java script, I need it in php, please give example. Link to comment Share on other sites More sharing options...
actionsketch Posted October 23, 2005 Share Posted October 23, 2005 You can't. PHP is limited to doing server-side processes and cannot talk directly to the browser like that. Javascript is your only option. Link to comment Share on other sites More sharing options...
mona Posted October 23, 2005 Author Share Posted October 23, 2005 OK, THANKS FOR YOUR HINT Link to comment Share on other sites More sharing options...
Jack McKalling Posted November 9, 2005 Share Posted November 9, 2005 Oh, but you do can write the javascript with php, but you don''t want to use javascript at all.If you change your mind, you can do this: <?php echo "<body onload='MyForm.Focused.focus()'>\n"; ?> ....<form name="MyForm" .... ><input name="Focused" .... ><input .... ></form></body> (the green is JavaScript) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now