This is a discussion on "javascript textbox changer" within the JavaScript Forum section. This forum, and the thread "javascript textbox changer are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
javascript textbox changer
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
javascript textbox changer
I have a form...
which consist of two text field that will be entered by the user! What i want to do is, there will be a button or a text link beside each of the text box(similar to javascript date picker) but when the user click the link, what ever inside the text box will be replace with "EMPTY" word, this "EMPTY" word is fixed! can anybody help me!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|
|
||||
|
add an id="text1" and id="text2" to each text field, and then for the button or text link put the following code:
hope that helps |
|
|||
|
well, i get the idea, but i dont know how to make the link text?
this is my from: How do i make the link Where should i put the "document.getElementById('text1').value = "EMPTY";" can you show me, please <form name="form1"> <input id="text1" type="text" name="age">change</p> <--This will be the text button--> </p> </form>
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
like this monie
|
|
|||
|
thanx benbacardi
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
hey...another thought!
What if i have multiple field that i want to change the value inside the text box with just one text link? i tried to modify your code but doesn't seems to work! is it posible to do that?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
Sorry about that...
I have more that one text box (text input)in my page, when i clicked the text link(that you gave me)... all of the value inside the text box will be changed to "EMPTY" that means, with just one text link, it will change all the text input to "EMPTY"
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
just add more id's to the text boxes, and then add more corresponding
Make sure you have the semi-colon at the end of each "EMPTY"; - otherwise it wont work! |
![]() |
| Tags |
| javascript, textbox, changer |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| textbox in datalist | ktsirig | ASP.NET Forum | 0 | Dec 14th, 2007 15:40 |
| Problem to add text to the textbox | flexed | JavaScript Forum | 1 | Aug 21st, 2006 06:43 |
| TextBox problem | accessman | Databases | 1 | Oct 15th, 2005 01:19 |
| Error Message: TextBox | accessman | Databases | 1 | Oct 15th, 2005 01:07 |
| VS.NET, TextBox, overlay, DataGrid | Smokie | ASP.NET Forum | 10 | Jul 27th, 2004 12:17 |