473,503 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to set text field value as web page title on entering text in text field

10 New Member
hi
i am getting trouble in displaying text field value as web page title on entering text in text field.
can any one help me solving this problem
here my code


Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function showtitle(tl)
  5. {
  6. window.document.title=tl;
  7. }
  8. </script>
  9. <body>
  10. <form  name="accepttestpage" method="post"  action="customerdetailsinsertion.php">
  11.  
  12. <p>Customer Name<input type="text" name="cname" maxlength=50 id="cname1" onchange="showtitle(this.id)">/p>
  13. <p>Contact Address</td><td><input type="text" name="address" id="address"></p>
  14. <p><input type=submit  value=Save&print >
  15. <input type=reset value=Reset></p>
  16. </form>
  17. </body>
  18. </html>
Feb 27 '12 #1
3 2119
acoder
16,027 Recognized Expert Moderator MVP
You want to use this.value, not this.id.
Feb 27 '12 #2
Dormilich
8,658 Recognized Expert Moderator Expert
what kind of trouble?
Feb 27 '12 #3
rameshbabu1251
10 New Member
yes i want to use this.value i tried but i could not get it
Feb 27 '12 #4

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

Similar topics

3
2263
by: NotGiven | last post by:
I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed and cause the form to fail. Any ideas?
2
2971
by: Irene | last post by:
Hi, I would like to modify the text within an html title tag based upon a value read from the registry (or the existence of a certain file). For example, if a certain registry value is equal...
4
1681
by: melvynadam | last post by:
If I open a new page with very little text on it such as a bugmenot results page is there a way to select some of the text there and assign it to variables? Selecting all and copying to the...
4
3882
by: GavMc | last post by:
Hello I am new to internet programming and wonder if anyone can help me with this.... I am trying to pass a hidden field value on a form into another field on the form so that it can then be...
5
2898
by: Maxim Izbrodin | last post by:
Hello For displaying page titles for my ASP.NET applications I use the following technique <title><%=BannerModule.PageTitle%></title where BannerModule.PageTitle is a public field of my user...
1
1363
by: MattB | last post by:
I'd like to preface every page in my application's title with some text. I have what I think is a good idea on how to do this, but I'm not sure how to refer to the current page from...
14
3461
by: Paul | last post by:
I want to set the page title and/or a form hidden field programatically through ASP.Net. I do not want to use something like... <% sTitle ="My Title" %> <html><title><%=sTitle%></title>..... ...
6
6306
by: Nevyn Twyll | last post by:
In my code behind page, I want to dynamically set the page title of my page (the one that shows on IE's toolbar). How do I do that? - Nevyn
1
4338
by: harikca | last post by:
I have the following html code: <html> <head> <title> Node Entry</title> </head> <body> <form action="sqlconnect.php" method="post"><table border="5"> <tr> <td><textarea rows=3 cols=70...
3
3211
by: Indrajit Chakraborty | last post by:
I am developing a simple web site in ASP. I have a web page which has a form, and I want to set the values of two text box to 2 fields selected by a query. One of the fields is a name field which has...
1
7006
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5592
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5021
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4685
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1519
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
397
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.