473,371 Members | 1,508 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,371 software developers and data experts.

How to set focus on a label after a button clicked (web applicatio

Hi, all:

I have a label "ID=lblTotal" in my aspx page and also have a button
"ID=btnTotal"
I would like to click total button and show the result on the label and set
focus on the label. Now, when I click the button, the result shows on the
label, but the cusor will go to the top of the page, which I have drag the
page down to see the result.

How should I do it? I think javascript is needed here, but how? (I am using
vb.net for this web App.)
Jul 21 '05 #1
2 6840
if you are not familar with javascript, why not use anchor to insteal of it

Tony
"Symphony" <Sy******@discussions.microsoft.com> wrote in message
news:7D**********************************@microsof t.com...
Hi, all:

I have a label "ID=lblTotal" in my aspx page and also have a button
"ID=btnTotal"
I would like to click total button and show the result on the label and set focus on the label. Now, when I click the button, the result shows on the
label, but the cusor will go to the top of the page, which I have drag the
page down to see the result.

How should I do it? I think javascript is needed here, but how? (I am using vb.net for this web App.)

Jul 21 '05 #2
if I use anchor, I will lost all the info. the user just typed in, Can I use
anchor and also keep the info. that user just typed in? Thanks.

"Tony" wrote:
if you are not familar with javascript, why not use anchor to insteal of it

Tony
"Symphony" <Sy******@discussions.microsoft.com> wrote in message
news:7D**********************************@microsof t.com...
Hi, all:

I have a label "ID=lblTotal" in my aspx page and also have a button
"ID=btnTotal"
I would like to click total button and show the result on the label and

set
focus on the label. Now, when I click the button, the result shows on the
label, but the cusor will go to the top of the page, which I have drag the
page down to see the result.

How should I do it? I think javascript is needed here, but how? (I am

using
vb.net for this web App.)


Jul 21 '05 #3

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

Similar topics

7
by: Chris | last post by:
I'm using eight links listed horizontally as a menu on my site. I'm using font-variant:small-caps and they are padded so that they mimic buttons. My gripe is with the way IE handles the focus...
0
by: Symphony | last post by:
Hi,all: I am using vb.net develop a web application. On one form(form1) I have a button called "calculate total" and a lable call "total", after click "calculate total", the total amount will...
1
by: PK9 | last post by:
On my page, I want to set the focus to the top of the page (where I have a message in a label) after a button is clicked. How can I use javascript on the server side to set the focus either to a...
8
by: Yeah | last post by:
I wish to use a drop box where each Option will not take the user to a web page - but a certain location on the same page the drop box exists. For example, Option 1 would take the user to "Chapter...
2
by: Symphony | last post by:
Hi, all: I have a label "ID=lblTotal" in my aspx page and also have a button "ID=btnTotal" I would like to click total button and show the result on the label and set focus on the label. Now,...
16
by: Stuart | last post by:
I have a page where I utilise the left and right cursor keys to change an image, also on this page is a groups of radio buttons, unfortunately when a radio button is clicked the focus for the...
11
by: Alex.Svetos | last post by:
Hello, I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz...
4
by: pablorp80 | last post by:
Hello, Here is what I need: I need the focus and the cursor set to a textbox named txtGT, every time no matter if it is the first page load or whether it is a postback. Here is the problem: I...
1
by: karthik25 | last post by:
Hi, The following code creates a tab container, 5 tab panels, buttons, labels. I was able to add event handlers to the button. But how am i supposed to access the dynamically created labels? For...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.