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

autopostback not going to next field

I have a screen that just takes a phone book entry. In the Cell Phone
question, it checks to see if the field has changed. If the field is
no, it disables the textbox and greys out the label. If the field is
yes, it enables the Cell Phone field.

The problem is that when it returns, it doesn't go to cell phone number
field, which I would expect that it would. Am I doing something wrong here?

************************************************** **************
<%@Page Explicit="True" Language="VB" Debug="True" %>
<html>
<script runat="server">
Sub HaveCell_TextChanged(Sender As Object, E As EventArgs)
If HaveCell.Text <> "yes" Then
LabelCellPhone.Enabled = False
CellPhone.Enabled = False
CellPhone.ToolTip = "No Cell Phone"
Else
LabelCellPhone.Enabled = True
CellPhone.Enabled = True
CellPhone.ToolTip = "Please enter your cell phone number"
End If
End Sub
</script>
<body>
<h1>Add Phonebook Entry</h1>
<form runat="server">
<asp:label id="LabelName" text="Name"
runat="server"/><br>
<asp:textbox id="Name" runat="server"
tooltip="Please enter your name"
tabindex=10/><br>

<asp:label id="LabelHomePhone" text="Home Phone"
runat="server"/><br>
<asp:textbox id="HomePhone" runat="server"
tooltip="Please enter your home phone number"
tabindex=20/><br>

<asp:label id="LabelHaveCell"
text="Do you have a cell phone?"
runat="server"/><br>
<asp:textbox id="HaveCell" runat="server"
tooltip="Do you have a cell phone? Answer yes or no."
ontextchanged="HaveCell_TextChanged"
autopostback="true" tabindex=30/><br>

<asp:label id="LabelCellPhone" text="Cell Phone"
runat="server"/><br>
<asp:textbox id="CellPhone" runat="server"
tooltip="Please enter your cell phone number"
tabindex=40/><br>

</form>
</body>
</html>

************************************************** *************

Thanks,

Tom.

Nov 18 '05 #1
0 1052

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

Similar topics

1
by: LRD | last post by:
Form not refreshing after autopostback unless keyboard or mouse move Hi, We created several new ASP.NET C# forms for our intranet. In each form we use panels for different sections of the...
2
by: SLE | last post by:
A web user control exposes a RadioButtonList (with AutoPostBack = true) called "Question". This control also has an embedded RequiredFieldValidator control. 1. Main ASPX page is populated with...
1
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What...
3
by: - Steve - | last post by:
I have two textboxe's (FirstName & LastName). I have set autopostback on both of those. The problem is if you enter the first name and then tab, it doesn't go to the next textbox. So then you...
2
by: Tom Edelbrok | last post by:
Question: Why does a button event (ie: Button1_Click) get executed on the first click for a textbox control which has 'autopostback=false', but doesn't get executed until a second click when...
3
by: Brad | last post by:
The first text on my form is a numeric field. I have a javascript that runs on this field for onkeyup (validate the key strokes and modifies fields on the screen) but when I do this and have the...
1
by: danyeungw | last post by:
I get the following from the link http://support.microsoft.com/kb/314206. I need to have both work - the page stays where it is and set focus to next control. Does anyone have solution? I have...
0
by: andy | last post by:
Hi, I have a form uses several dropdownlists to narrow a set of criteria. ( This is in turn used to control what is shown on a gridview. ) With each, the user selects an entry and then the next...
2
by: Mufasa | last post by:
I have a page where there's some math being done between a couple of fields. They are autopostback so essentially it won't let them go on if certain conditions aren't met. If the person tabs out of...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.