[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Renaming a TextBox

Posted on 2002-04-03
5
Medium Priority
?
183 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
2 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

872 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