HTML - Help! How To Put Text In Input Fields?
Hi everyone,
What I am asking is more complicated than the thread title says. Can someone please tell me how, or post some code to show how I can make input fields with these properties: 1. Make text appear in an input field whilst off focus but dissapear whilst on focus, re-appear again if put back on focus. 2. The user can type text in the field and edit it and when the input field is off focus the text he wrote remains there. 3. If the user completely erases the text he wrote and puts the input field off focus the default text (stated in 1.) re-appears. 4. Make a password input field without the default text (1.) being displayed as stars (hidden charaters) with same features as 1. , 2. , and 3. ofcourse. Can anyone please help me?... Evan Similar TutorialsHelp! How to put text in input fields? -------------------------------------------------------------------------------- Hi everyone, What I am asking is more complicated than the thread title says. Can someone please tell me how, or post some code to show how I can make input fields with these properties: 1. Make text appear in an input field whilst off focus but dissapear whilst on focus, re-appear again if put back on focus. 2. The user can type text in the field and edit it and when the input field is off focus the text he wrote remains there. 3. If the user completely erases the text he wrote and puts the input field off focus the default text (stated in 1.) re-appears. 4. Make a password input field without the default text (1.) being displayed as stars (hidden charaters) with same features as 1. , 2. , and 3. ofcourse. Can anyone please help me?... Evan I am creating a small crm and would like to have the input fields look like regular text until clicked on. At that point I would like the input field to be edited....is this possible? For example... First name : James would appear like this....when clicking on James, it puts a input box so you are able to edit the field. I will be using php. I'm very, very new to HTML, and quite bad at it. I've recently figured out how to use forms. I was wondering the following: Is it possible to have guests to my website input information that then end up on/in images. For example, let's say I wanted them to fill in the following information: Store Manager: Sales Manager: Advertising Manager: Human Resources: Research and Development Manager: Sales Rep 1: Sales Rep 2: Sales Rep 3: Advertiser 1: Advertiser 2: R+D Engineer 1: R+D Engineer 2: Once they filled in the information, I would want that information to populate an image (namely, an organizational flow chart like this one: http://www.sddot.com/images/org_chart.gif) Any help that anyone can give me would be greatly appreciated! I'm quite desperate. Hello Does anyone knows since when (or which html version) it is allowed to define form input names as arrays such as: ex: <form ...> <input name="MyArray[email]" /> <input name="MyArray[phone]" /> </form> At the least you need to use a scripting language like javascript to achieve what you are trying to do. Hi guys, I am working on a site and one of the pages has a weird issue. Sometimes, you cannot click in to: First name: Last name: E-mail: Phone : It is weird, as it usually affects 2 fields at a time and appears to happen randomly. Occurs in IE7 and Konqueror (KDE browser), but not in Firefox. If someone could tell me what is causing the problem, that would be perfect! The page in question is: http://www.premiumdjs.com/contact.php Thanks! Hi all! i have an annoying problem with a simple form, which accures only in explorer... the text fields respond to a click only at their very left end, or, if I give them a value, where the text actually show. How do I make it so that they will be "chosen" in response to a click anywhere within them? You can see a proto of the form at www.teleionholon.com/TH/form.html. This works great in Firefox, only explorer gives me a hard time! thank you so much! Shir Hey all, I'm having a problem with html input text fields. I'm trying to display a name in it but it only shows the first part of that name. Here is the part of the code I'm using for one of those : Code: <label>Name <span class="small">Name sent</span> </label> <input type="text" name="name" id="name" value=<?php echo $_POST["name"]; ?> /> If, as example, the name I'm getting from $_POST is : Alexander Johnson, there will only be Alexander in the text field. Note that if I create a really small function like this : Code: $name = $_POST["name"]; echo $name; Then the output will be Alexander Johnson instead of simply Alexander. Anyone knows what I'm doing wrong? (I'm using the labels and span class with css, but I don't think this is the problem. I have created a nice Newsletter Registration form, but I would really like to modify the form so that instead of displaying the browsers default images for text fields, checkboxes, etc, I want it to display my images that I have created. Is this possible without stepping into flash? Thanks Guys! -NH Hello, I am trying to create a page where the user can select four of their best skills and put in their past experience (in years) in previously defined boxes and have that automatically update the "results." But, i need the results to be filterable to match the top three skills exactly. So i put in skils A,B,C,D and i get results of jobs that "match" A,B,C. I have created a javascript for show/hide but i dont know how to add this updatable/filterable content. Here is a demo of my page Quote: <html> <head> <script type="text/javascript"> <!-- function experience(element_id) { var results = document.getElementById(element_id + "_Results"); var element = document.getElementById(element_id); results.value = element.value; } </script> <script> function showhide(id){ if (document.getElementById){ obj = document.getElementById(id); if (obj.style.display == "none"){ obj.style.display = ""; } else { obj.style.display = "none"; } } } </script> <title></title> </head> <body> <form name="compass"> <table border="1" width="100%"> <tr> <td colspan="2">Top Competencies</td> </tr> <tr> <td><select name="competencies"><option value="Setting Direction">Setting Direction</option><option value="Leadership Courage">Leadership Courage</option><option value="Creating the Environment">Creating the Environment</option><option value="Building and Maintaing Relationships">Building and Maintaining Relationships</option><option value="Developing for the Future">Developing for the Future</option><option value="Organizational Savvy">Organizational Savvy</option><option value="Achieving Measurable Results">Achieving Measurable Results</option> <option value="Customer Focus">Customer Focus</option> <option value="Ethics and Integrity">Ethics and Integrity</option> <option value="Composure">Composure</option> <option value="Personal Learning">Personal Learning</option> <option value="Dealing with Ambiguity">Dealing with Ambiguity</option> <option value="Decision-Making">Decision-Making</option> <option value="Interpersonal Savvy">Interpersonal Savvy</option> <option value="Results Oriented">Results Oriented</option> </select></td> <td><select name="competencies"><option value="Setting Direction">Setting Direction</option><option value="Leadership Courage">Leadership Courage</option><option value="Creating the Environment">Creating the Environment</option><option value="Building and Maintaing Relationships">Building and Maintaining Relationships</option><option value="Developing for the Future">Developing for the Future</option><option value="Organizational Savvy">Organizational Savvy</option><option value="Achieving Measurable Results">Achieving Measurable Results</option> <option value="Customer Focus">Customer Focus</option> <option value="Ethics and Integrity">Ethics and Integrity</option> <option value="Composure">Composure</option> <option value="Personal Learning">Personal Learning</option> <option value="Dealing with Ambiguity">Dealing with Ambiguity</option> <option value="Decision-Making">Decision-Making</option> <option value="Interpersonal Savvy">Interpersonal Savvy</option> <option value="Results Oriented">Results Oriented</option> </select></td> </tr> <tr> <td><select name="competencies"><option value="Setting Direction">Setting Direction</option><option value="Leadership Courage">Leadership Courage</option><option value="Creating the Environment">Creating the Environment</option><option value="Building and Maintaing Relationships">Building and Maintaining Relationships</option><option value="Developing for the Future">Developing for the Future</option><option value="Organizational Savvy">Organizational Savvy</option><option value="Achieving Measurable Results">Achieving Measurable Results</option> <option value="Customer Focus">Customer Focus</option> <option value="Ethics and Integrity">Ethics and Integrity</option> <option value="Composure">Composure</option> <option value="Personal Learning">Personal Learning</option> <option value="Dealing with Ambiguity">Dealing with Ambiguity</option> <option value="Decision-Making">Decision-Making</option> <option value="Interpersonal Savvy">Interpersonal Savvy</option> <option value="Results Oriented">Results Oriented</option> </select></td> <td><select name="competencies"><option value="Setting Direction">Setting Direction</option><option value="Leadership Courage">Leadership Courage</option><option value="Creating the Environment">Creating the Environment</option><option value="Building and Maintaing Relationships">Building and Maintaining Relationships</option><option value="Developing for the Future">Developing for the Future</option><option value="Organizational Savvy">Organizational Savvy</option><option value="Achieving Measurable Results">Achieving Measurable Results</option> <option value="Customer Focus">Customer Focus</option> <option value="Ethics and Integrity">Ethics and Integrity</option> <option value="Composure">Composure</option> <option value="Personal Learning">Personal Learning</option> <option value="Dealing with Ambiguity">Dealing with Ambiguity</option> <option value="Decision-Making">Decision-Making</option> <option value="Interpersonal Savvy">Interpersonal Savvy</option> <option value="Results Oriented">Results Oriented</option> </select></td> </tr> <tr> <td colspan="1"><input type="text" name="1" size="100%" value="Consulting to senior leadership" disabled></td> <td colspan="1"><input type="text" id="Requirements1" name="Requirements" onChange="experience('Requirements1')" value="Enter Years"></td> </tr> <tr> <td colspan="1"><input type="text" name="2" size="100%" value="Equal Employment Opportunity (EEO) and related human resource practices" disabled></td> <td colspan="1"><input type="text" id="Requirements2" name="Requirements" onChange="experience('Requirements2')" value="Enter Years"></td> </tr> <tr> <td colspan="1"><input type="text" name="3" size="100%" value="Recruiting with a large company" disabled></td> <td colspan="1"><input type="text" id="Requirements3" name="Requirements" onChange="experience('Requirements3')" value="Enter Years"></td> </tr> <tr> <td colspan="1"><input type="text" name="4" size="100%" value="Leadership and management" disabled></td> <td colspan="1"><input type="text" id="Requirements4" name="Requirements" onChange="experience('Requirements4')" value="Enter Years"></td> </tr> <tr> <td colspan="1"><input type="text" name="5" size="100%" value="Recruiting for diverse functional areas" disabled></td> <td colspan="1"><input type="text" id="Requirements5" name="Requirements" onChange="experience('Requirements5')" value="Enter Years"></td> </tr> <tr> <td colspan="4">Results</td> </tr> <tr> <td colspan="1"><div style="display:;" id="script"><input type="text" name="1" size="100%" value="Consulting to senior seadership" disabled></td> <td colspan="1"><input type="text" id="Requirements1_Results" name="Requirements1_Results" disabled></td> </tr> <tr> <td colspan="1"><div style="display:;" id="script2"><input type="text" name="2" size="100%" value="Equal Employment Opportunity (EEO) and related human resource practices" disabled></td> <td colspan="1"><input type="text" id="Requirements2_Results" name="Requirements2_Results" disabled></td> </tr> <tr> <td colspan="1"><input type="text" name="3" size="100%" value="Recruiting with a large company" disabled></td> <td colspan="1"><input type="text" id="Requirements3_Results" name="Requirements3_Results" disabled></td> </tr> <tr> <td colspan="1"><input type="text" name="4" size="100%" value="Leadership and management" disabled></td> <td colspan="1"><input type="text" id="Requirements4_Results" name="Requirements4_Results" disabled></td> </tr> <tr> <td colspan="1"><input type="text" name="5" size="100%" value="Recruiting for diverse functional areass" disabled></td> <td colspan="1"><input type="text" id="Requirements5_Results" name="Requirements5_Results" disabled></td></div> </tr> <p><a href="#" onclick="showhide('script'); return(false);">hide again</a></p> </table> </form> </body> </html> That is the page, i know it looks long and codey but its just because it has many examples. I really would appreciate any help! Thanks so much for all your past help guys/gals this is a noob question how can i align input fields? like Code: <html> <body> <form> username:<input type="text" name="user" /> password:<input type="password" name="pass" /> </form> </body> </html> take this in this by default the text and password fields will come on left hand side but i want it in right . so how can i do that ? Hey, I need to create a function or something else on this input text that only english strings can be wrote i mean not hebrew or arabic, if i'm typing hebrew/arabic letters it should wont be wroted I need to add to this code for example: Code: Name: <input type="text" name="your_name"/><br /> Hi, I have yet another problem which i think an intermediate php programmer can solve. Since I am very new, please bear with me: I want to try to make a page where the user can input a number of rows to create (this is going to be integrated into mysql), and be able to input the information on the same page. I have not developed the code yet because I could not think of a solution for this, which is why I made tihs thread. I hope you can also answer questions in the [ ] box because im also at a loss the So I want the user to choose the following: "New Entry" or "Old Entry"?[I was thinking these are submit buttons.. makes most sense] "How many Entries?: " user enters 3 and presses submit box [1. should this be a submit box, or another kind?] this is the hard part. I want the user to enter 3, and i want three new text boxes to show up where the user can input data, and just one submit button on the same screen. this i believe will use a forloop after it reads what the user entered so here is the question [question 2]: Can anyone tell me how to create a textbox inside <?php ?> where I can ask the user to input the information and click submit? so far I have only been able to do it in html. Hi. I am currently struggling to find a simple sollution to the following issue. I want to render out a text input box in HTML that will have a block (with borders) for every character. I can think of really tedious solutions that will involve a table with an input tag per cell but this will be nasty if something else is available. The solution is only for IE and cannot involve any ActiveX components due to security issues. So is there any easy way to basically create internal borders in an input or textbox tag that will separate the characters for me? Thanks. Hi, I'm trying to make a text input in a form automatically focus when the page is loaded. I know i can't use onLoad directly in the input tag and, searching on the web, i found that i have to use onLoad on the body element - something like this: <body OnLoad="document.myform.mytextfield.focus();"> The problem is i have multiple text inputs sharing the same name (they are cells in a table) so i can't use the input's name. But i do know it's the last element with that name (the last row in the table). So, how can i focus it? I hope you can help me, everything i tried didn't work. Thank you. Hello.... I have a problem today and I do not know how to over come this problem. If this is in the wrong place, please tell me and I will put it in the right place. Anyway. Today I am trying to make a webpage, where the user, the admin, is able to edit the page to input text. Almost like when you make a blog post and you have a text box and you type what you want and you click submit or post and it goes onto a page. Almost like wordpress. I want to make a custom page from the ground up where there are different divisions of the page and the admin can input or edit text/pictures at anytime. Thank you in advance. I'm making a form that contains three places for the user to enter text. The first two are for taking only one line of text, but the third is a bigger input for taking in multiple paragraphs of text. The trouble is, I can't get this third one to wrap the text! Is there a way to turn word wrapping on for an input bar? Or should I be using a different form element? Hi, I want to modify a form where I have some "select option" and input text tags. The thing is that when a user select an option from the "select opcion" tag, according to the option selected I want to print some input text in the form .. how can i do that?. Thks a lot! Hi all. I'm and HTML Newbie and am building a quick and easy site for someone. The way I typically do it for these type of "brochure" style sites is to simply lay everything out in photoshop. Slice it up save as HTML and then edit in Dreamweaver. Here is the HTML as it is now: Quote: <html> <head> <title>JessicaSite</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <p> </p> <!-- Save for Web Slices (JessicaSite.psd) --> <table width="948" height="605" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01"> <tr> <td colspan="5"><img src="images/Services_01.jpg" width="948" height="518" alt=""></td> </tr> <tr> <td><a href="Home.html"><img src="images/Services_02.jpg" alt="" width="176" height="87" border="0"></a></td> <td><a href="Services.Html"><img src="images/Services_03.jpg" alt="" width="178" height="87" border="0"></a></td> <td><a href="Gallery.Html"><img src="images/Services_04.jpg" alt="" width="180" height="87" border="0"></a></td> <td><a href="Designer.Html"><img src="images/Services_05.jpg" alt="" width="193" height="87" border="0"></a></td> <td><a href="Contact.Html"><img src="images/Services_06.jpg" alt="" width="221" height="87" border="0"></a></td> </tr> </table> <!-- End Save for Web Slices --> </body> </html> Pretty simple. In the first Table I'd like to be able to put text in there and have it scroll. How do I do this? I've already tried putting a div style="overflow:auto; tag around the first table but that definitely didn't work. Any suggestions? Bare in mind I know NO CSS and only the basics of HTML. Hi Guys I have a text input field in a form that has data in it from a previous entries. Is there something i can do that ensures the field is empty when the form is pulled up? Thanks everyone |