Solved

Renaming a TextBox

Posted on 2002-04-03
5
172 Views
Last Modified: 2013-12-24
When I add a TextBox control to a HTML page and then
rename the control (id and name) from Text1 to for example
txtName in either the source windows or properties window.
If I try and reference the control txtName in a function
the control is not recognised, when you type the txtname.
the properties and methods do not display and when the
function is executed nothing happens. The control
correctly appears in the script outline.
0
Comment
Question by:dty
5 Comments
 
LVL 20

Accepted Solution

by:
hes earned 50 total points
ID: 6919001
It works when I do it. Added a textbox and a button to a blank page. Renamed Text1 to txtName. Created a function so when the button is pressed Hello will be the textbox's value.

<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=VBScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--

Function button1_onclick
txtName.value = "Hello"
End Function

-->
</SCRIPT>
</HEAD>
<BODY>

<P><INPUT id=txtName name=txtName>
<INPUT id=button1 type=button value=Button name=button1></P>

</BODY>
</HTML>

Make sure you are editing in Interdev using the HTML Editor (Default)
0
 

Expert Comment

by:jumprooster
ID: 7518419
You should show your code, it could be a syntax error in your coding.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now