bassdog65 Posted September 20, 2008 Share Posted September 20, 2008 This may be more of an HTML question, but I know how to prepopulate a radio button or a check box to be pre-checked, how do I make a text field have the cursor in it when you go to a specific page? Link to comment https://forums.phpfreaks.com/topic/125132-making-a-cursor-pre-populate-in-a-text-field/ Share on other sites More sharing options...
Adam Posted September 20, 2008 Share Posted September 20, 2008 Could use javascript... something like: <body onload="document.forms[0].inputName.focus();"> ?? Adam Link to comment https://forums.phpfreaks.com/topic/125132-making-a-cursor-pre-populate-in-a-text-field/#findComment-646745 Share on other sites More sharing options...
bassdog65 Posted September 21, 2008 Author Share Posted September 21, 2008 hmmm. I know absolutey zero javascript. How would it interact with my PHP/HTML code. If I have a text box: <p><b>Email Address:</b> <input type="text" name="email" size="20" maxlength="40" /></p> What would I use to specify in that javascript that I want it to populate in that specific box...as I have a password text box too. Link to comment https://forums.phpfreaks.com/topic/125132-making-a-cursor-pre-populate-in-a-text-field/#findComment-646772 Share on other sites More sharing options...
bassdog65 Posted September 21, 2008 Author Share Posted September 21, 2008 nevermind, I got it. I didn't really read your tag before I posted. It just goes in the same tag as the body. Thakns for the help! Link to comment https://forums.phpfreaks.com/topic/125132-making-a-cursor-pre-populate-in-a-text-field/#findComment-646993 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.