473,657 Members | 2,595 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 2122
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
2275
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
2975
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 to 1 then the title should be <title>blah blah App1</title> otherwise the title should be <title>blah blah App2</title>. Could someone recommend a way within the html page to do this?
4
1695
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 clipboard can be done with: document.execCommand("SelectAll"); document.execCommand("Copy"); but I'm looking for something a little more refined. The page contains seven lines of text and I'd like a simple way to say:
4
3896
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 inserted in the database, to enable me then to reference that number at a later date. (The hidden value (1 for example) would then automatically get passed to the other input field.)
5
2909
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 control. This field is initialized in Page_Load of every my page. This technique works with the exception that the title disappears every time a page is posted back. Could somebody explain me the reason, or suggest a better technique for setting page...
1
1371
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 global.asax.vb. My plan is to put some code in the Application_BeginRequest event in global.asax.vb or in a user control that will be present on every page that will add this text to the page title if it's not a postback. My main problem now is finding out...
14
3475
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>..... I want to completely seperate the code from presentation. I would like to do the same thing for a value of a hidden form field but
6
6323
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
4345
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 name="parent_node"> </textarea></td> </tr> <tr> <td> <input type="text" name="Node" maxlength="207000" size="20700"> <br> </td> </tr>
3
3224
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 the First Name and the Last Name separated by a space. The text box only shows the First Name and not the last Name. Any idea how to show the complete field value? <% Response.Expires = 0 Response.Cookies ("name")= "" Response.Cookies ("Eid")=...
0
8397
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6167
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
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 we have to send another system
2
1620
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.