Solved

Renaming a TextBox

Posted on 2002-04-03
5
170 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ColdFusion Web Service/WSDL Connection Issue 2 89
Expression Web 4 the latest 3 85
Collapseable list of URLs. 10 114
Advice on what platform to use for a web app for AWS 3 94
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…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…

920 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

20 Experts available now in Live!

Get 1:1 Help Now