473,387 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

label.text refresh

Hi
I hope some one can help me

I have a table of type <asp:Table>. This table is filled
in runtime with labels and textboxes(also server
controls). I have written a function i jscript since when
a user leaves on of the textbox I want to update a labels
text. The problem is to refresh that text. some sample
code: In the html-page
<script language="jscript">
function test(txtId, txtText)
{
var lbl,i, txt1, txt2,val;
if (txtId=="txt")
{
txt1=document.body.getElementsByTagName("test");
lbl1=document.body.getElementsByTagName("lbl1");
lbl1.Text= 'test';
alert(lbl1.Text);
}
}
</script>

I know I get the right things in the alert. So how do i
refresh just one specific label thats in a tablecell, any
suggestions?

/Maria
Nov 18 '05 #1
1 2452
Hi, Maria

ASP:Label is rendered as html span and ASP:TextBox is
rendered as input textbox or Textarea in client side. So
in client side, you could access its text by value or
innerText property.
Like:
lbl1.innerText = txt1.value;

Bin Song, MCP
-----Original Message-----
Hi
I hope some one can help me

I have a table of type <asp:Table>. This table is filled
in runtime with labels and textboxes(also server
controls). I have written a function i jscript since when
a user leaves on of the textbox I want to update a labels
text. The problem is to refresh that text. some sample
code: In the html-page
<script language="jscript">
function test(txtId, txtText)
{
var lbl,i, txt1, txt2,val;
if (txtId=="txt")
{
txt1=document.body.getElementsByTagName("test") ;
lbl1=document.body.getElementsByTagName("lbl1") ;
lbl1.Text= 'test';
alert(lbl1.Text);
}
}
</script>

I know I get the right things in the alert. So how do i
refresh just one specific label thats in a tablecell, any
suggestions?

/Maria
.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bruce Wolfe | last post by:
I having a problem programmatically changing the text for a Label control. No matter what I do, the text will remain what was defined in the designer. I've tried everything. After setting the...
4
by: Yogi_Bear_79 | last post by:
Self Taught here so please bear with me. I have the labelRestrictSites as private on the MainForm.cs. I then access the labelRestrictSites.Text thru the public string LabelRestrictSites from...
7
by: jez123456 | last post by:
Hi, I have the following method where I need to display which database is being processed, however, the label lblDatabase dosn't seem to work until the end. private void...
1
by: ProgramAnalyst | last post by:
Hey all, I have a label that gets its text from a DB. This text can be changed on the page in a textbox and after the save button is clicked the new text is updated in the DB and the page...
1
by: nospamjac | last post by:
Hi, Is there a way to update the text of an asp:label on a webform without refreshing the entire page? What is called by button clicks and other events that refresh a webform control? See the...
5
by: David-L. Nadeau | last post by:
Hi ! I have a little problem. I have a process that runs when a user click a button. The process is long to execute (+/- 5 minutes). So, I put a progress bar and now I want to show the evolution...
6
by: jcrouse | last post by:
I am rotating some text is some label controls. In the one place I use it it works fine. In the other place I use it I can't figure out the syntax. I don't really understand the event. Where it...
13
by: AKHTAR ALI | last post by:
Dear Sir, i am reading a text file line by line from vb and insert in oracle table through pl/sql procedure. in text file record is 70000, in my code i make a loop to read data in loop and...
2
by: =?Utf-8?B?Y2FzaGRlc2ttYWM=?= | last post by:
Hi, I have a Label on a Windows form (Version 1.1.4322) and while I iterate recursively through a method I want to show the name of the current file being copied to another directory. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...

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.