Jump to content

Search the Community

Showing results for tags 'textbox'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 6 results

  1. Hi guys, In my work we have to send texts to people through emails. The format needs to be +447123456789@sms.com (as an example). I have an HTML page with some helpful notes, links etc I keep open for quickness. What I want is to have a textbox on the page that I can type a standard mobile number into as '07123456789' and a copy button under it that will copy it as +447123456789@sms.com. So it needs to replace the '0' with '+44' and add the '@sms.com' on the end. I have seen it done before but can't figure out how. I know basic coding but I am better at tearing apart and rearranging to make it how I want than writing from scratch. Might be something really simple but I am just missing it! Any help would be much appreciated! Thanks
  2. Enter text with onclick.

    I have some code that im trying to enter text into a text box with a button click. example you click button 1 and enter 1 into text box. I tried it on jsfiddle it works but just in a regular page it dosent work it gives me [object HTMLInputElement] in the text box. <html><head> <script src="jquery-1.7.1.js"></script> <script src="sprintf.js"></script> <script type="text/javascript"></script> <script>function NUMBERS(num){ var txt = document.getElementById("textfield").value; txt = txt + num; document.getElementById("textfield").value = txt; } </script></head><body><p> <input type="text" id="textfield"></p><p> <input type="button" name="no" value="1" onClick="NUMBERS(this,value)"> <input type="button" name="no" value="2" onClick="NUMBERS(this,value)"> <input type="button" name="no" value="3" onClick="NUMBERS(this,value)"> <input type="button" name="no" value="4" onClick="NUMBERS(this,value)"> <input type="button" name="no" value="5" onClick="NUMBERS(this,value)"> <input type="button" name="no" value="6" onClick="NUMBERS(this,value)"> <input type="button" name="no" value="7" onClick="NUMBERS(this,value)"> <input type="button" name="no" value="8" onClick="NUMBERS(this,value)"> <input type="button" name="no" value="9" onClick="NUMBERS(this,value)"> <input type="button" name="no" value="0" onClick="NUMBERS(this,value)"></p></body></html>
  3. How do you clear input text box?

    <!DOCTYPE html><html lang = "en-US"> <head> <meta charset = "UTF-8"> <style type = "text/css"> fieldset { width: 850px; margin: auto; text-align: center; } #txtField { text-align: center; } #tryAgainBtn { display: none; } </style> <script type = "text/javascript"> window.onload = myFunction; var randomNumber; var outPut; function myFunction() { randomNumber = Math.floor(Math.random()*1000); document.getElementById("checkBtn").onclick = checkAnswer; document.getElementById("tryAgainBtn").onclick = tryAgain; } function checkAnswer() { outPut = document.getElementById("outPut"); outPut.innerHTML = ""; var myInput = document.getElementById("txtField"); if (myInput.value < 0 || myInput.value > 1000) { return outPut.innerHTML += "I said between 0 and 1000."; } if (myInput.value == "") { return outPut.innerHTML += "Please enter a number between 0 and 1000!!!"; } if (myInput.value > randomNumber) { outPut.innerHTML += "Too High !!!"; } if (myInput.value < randomNumber) { outPut.innerHTML += "Too low !!!"; } if (myInput.value == randomNumber) { outPut.innerHTML += "Yay, you are awesome !!!"; document.getElementById("tryAgainBtn").style.display = "inline"; } document.getElementById("txtField").onclick = reset(); } function tryAgain() { document.getElementById("txtField").value = ""; outPut.innerHTML = ""; document.getElementById("tryAgainBtn").style.display = "none"; randomNumber = Math.floor(Math.random()*1000); } </script> </head> [attachment=1390:MyGame.png]<body> <form action = " " id = "myForm"> <fieldset> <p>Let's play a guessing game, I am thinking about a number between 0 and 1000. Enter your guess in the box, I'll tell you if it's correct or not. </p> <div id = "outPut"> </div> <input type = "text" id = "txtField"/> <br/> <button type = "button" id = "checkBtn"> Check your guess!!! </button> <br/> <button type = "button" id = "tryAgainBtn"> Try again ??? </button> </fieldset> </form> </body></html> Hi guys, I am building this text-based guessing game(please don't judge, I'm just a starter), everything is working correctly, just one thing I can't find the answer anywhere at all, but I sure know you guys do know the answer, my question is, btw, I've attached a picture so you can conjure up what I am trying to say, ok, so, after the user entered a value, and they are gonna enter another value, so when the user clicks on the box, what do I do to make the previously entered value removed, like when they click on the box, the previous value disappears, I've tried using the reset() method as you can see in the code, but every time the "Check your answer" button is clicked, the value disappears right away, and that is not I want, I really don't know method to use? any suggestions are greatly appreciated. Thank you very much for your time and help.
  4. How do I wrap text in a textbox

    Hello internet. I am having an issue figuring out how to get text to type only in the visible text box on the screen and not scroll through on one line when typing. I have tried using textarea and placing callouts for wrap,rows,cols but that does not seem to work. How do I get the text to wrap? Here is my textbox code I have in the <head> tag BUT when text is being typed in the box it only shows on the first line. I want it to wrap in the text box on the screen. Please help. <style type="text/css">.commentbox {width:200px; height:72px}</style>
  5. Does anyone know what event is fired when a Dropdown entry is selected for an input of type Textbox? I am using the AutoComplete Widget of the jQuery UI and I am attempting to perform some functions on the style of the Textbox when a user selects one of the entries. P.S. I'm also wondering is there a way a can track which events are being triggered as I use controls on the page perhaps maybe Google Chrome Developer Tools or FireFox Develpor Tools have this functionality?
  6. Query: how to create log in text box?

    Greetings,Hey everyone, I've had a query about how to create a form text box with some value inside that gets automatically cleared as the user clicks on it to edit it, more like this example on www.bodybuilding.com they have a sign in form at the right hand-side next to the flash slide show.. Sorry if my question is not that professional but I can't seem to know how from their source code.. Thanks for your time and effort..
×