[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Renaming a TextBox

Posted on 2002-04-03
5
Medium Priority
?
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 20

Accepted Solution

by:
hes earned 200 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

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

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

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
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 properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

650 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