473,387 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Help needed: Edit an text box using link

2
HI,

I used this as an start:

<html>
<body>

<form action="">
First name:
<input type="text" name="firstname">
<br>
Last name:
<input type="text" name="lastname">
</form>

</body>
</html>

as you kan see its an form, the textfield is named firstname and last name,

My question is:
Is it possible to make a link under last name that sais I dont have a last name And when you press the link "i dont have a last name" the text Noboddy shows in the lastname field?

Hope 4 an positive reply on this one ;)
Dec 2 '07 #1
4 1379
drhowarddrfine
7,435 Expert 4TB
html cannot do this but javascript can.
Dec 2 '07 #2
eWish
971 Expert 512MB
You are going to need a client / server side language to do this. HTML / CSS can not do this for you.

JavaScript Tutorial

What language are you using? (php, perl, rudy, etc...)

--Kevin
Dec 2 '07 #3
joacom
2
Hi i am a little nube :P

The reason i was going to do this, is that the work flow sheets on my work sucks, and i`ll want to upgrade it alittle,

It seems to bee java and xml.
Dec 3 '07 #4
Markus
6,050 Expert 4TB
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function noLastName(id)
  5. {
  6.  var lastnameInput = document.getElementById(id);
  7.   lastnameInput.value = "Nobody";
  8. }
  9. </script>
  10. <body>
  11.  
  12. <form action="">
  13. First name: 
  14. <input type="text" name="firstname">
  15. <br>
  16. Last name: 
  17. <input type="text" name="lastname" id="lastname"> <a href="javascript: noLastName('lastname')">Click if you have no last name</a>
  18. </form>
  19.  
  20. </body>
  21. </html>
  22.  
Dec 3 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Munzilla | last post by:
Ok, I have an ASP page that I use to add several pieces of information to a database and also display that information in an edit mode. The problem is, when I use the page for edit, not all of the...
10
by: Bharat | last post by:
Hi Folks, Suppose I have two link button on a page (say lnkBtn1 and lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically created control. And On the click event of the lnkBtn2 I...
2
by: Goober | last post by:
I have the following default.aspx page that works properly. However, what I want to do is to link the graphics within it (that are hard coded now in the default web page) to our corporate...
3
by: Bernie Walker | last post by:
Hello, I have a asp.net application that collects input from users and stores data in SQL database. One of the options of the application is to store file attachments. When the user wants to...
23
by: casper christensen | last post by:
Hi I run a directory, where programs are listed based on the number of clicks they have recieved. The program with most clicks are placed on top and so on. Now I would like people to be apple to...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
13
by: Jennifer.Berube | last post by:
well I'm not sure how to go about making my SQL connection string... The code below is what I need to replace with my SQL connection...I just don't know if that code is for DSN or access... I...
4
by: pankajsingh5k | last post by:
Hi guys, These question is for all the experts... Please help me before my brain explodes The problem is again with the formview control.. I have a formview and i have to use it that...
0
by: richard12345 | last post by:
Hi Guys I have problem with site I am building. The sidebar with menu and other thinks is overlapping footer. The footer move with the content and but it dos it dos not move with the sidebar. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.