Click here to Skip to main content
15,889,216 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: User control - how to access the element using javascript Pin
AspDotNetDev18-Jan-12 18:10
protectorAspDotNetDev18-Jan-12 18:10 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716719-Jan-12 4:02
Member 779716719-Jan-12 4:02 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716719-Jan-12 4:23
Member 779716719-Jan-12 4:23 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716719-Jan-12 4:35
Member 779716719-Jan-12 4:35 
GeneralRe: User control - how to access the element using javascript Pin
AspDotNetDev19-Jan-12 7:39
protectorAspDotNetDev19-Jan-12 7:39 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716720-Jan-12 12:30
Member 779716720-Jan-12 12:30 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716719-Jan-12 9:14
Member 779716719-Jan-12 9:14 
QuestionRe: User control - how to access the element using javascript Pin
AspDotNetDev19-Jan-12 10:53
protectorAspDotNetDev19-Jan-12 10:53 
So, your theory is that you set focus to the drop down list, then when you click on the textbox the focus is lost on the drop down list and causes a postback? That doesn't make sense to me, as I just created a test page and I couldn't replicate that behavior:
ASP.NET
<%@ Page Language="vb" AutoEventWireup="false" %>

<script runat="server">
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    ddlTest.Focus()
  End Sub
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Test PostBack</title>
</head>
<body>
  <form id="form1" runat="server">
  <div>
    Postback: <%= Page.IsPostBack.ToString() %>
    <br />
    <asp:DropDownList runat="server" ID="ddlTest" AutoPostBack="true">
      <asp:ListItem Text="Item 1" Value="1" />
      <asp:ListItem Text="Item 2" Value="2" />
      <asp:ListItem Text="Item 3" Value="3" />
    </asp:DropDownList>
    <br />
    <asp:TextBox runat="server" />
  </div>
  </form>
</body>
</html>


The focus starts on the drop down list. When I click the textbox, there is no postback. Can you create a test page that replicates the behavior?

AnswerRe: User control - how to access the element using javascript Pin
Member 779716720-Jan-12 12:12
Member 779716720-Jan-12 12:12 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716719-Jan-12 9:27
Member 779716719-Jan-12 9:27 
GeneralRe: User control - how to access the element using javascript Pin
BobJanova18-Jan-12 22:44
BobJanova18-Jan-12 22:44 
QuestionAjax issue Pin
MacRaider416-Jan-12 6:57
MacRaider416-Jan-12 6:57 
AnswerRe: Ajax issue Pin
Not Active16-Jan-12 7:41
mentorNot Active16-Jan-12 7:41 
GeneralRe: Ajax issue Pin
MacRaider416-Jan-12 8:06
MacRaider416-Jan-12 8:06 
QuestionRe: Ajax issue Pin
AspDotNetDev16-Jan-12 8:20
protectorAspDotNetDev16-Jan-12 8:20 
AnswerRe: Ajax issue Pin
MacRaider416-Jan-12 8:34
MacRaider416-Jan-12 8:34 
AnswerRe: Ajax issue Pin
AspDotNetDev16-Jan-12 8:55
protectorAspDotNetDev16-Jan-12 8:55 
GeneralRe: Ajax issue Pin
MacRaider416-Jan-12 9:48
MacRaider416-Jan-12 9:48 
GeneralRe: Ajax issue Pin
MacRaider417-Jan-12 1:59
MacRaider417-Jan-12 1:59 
GeneralRe: Ajax issue Pin
BobJanova17-Jan-12 3:59
BobJanova17-Jan-12 3:59 
GeneralRe: Ajax issue Pin
MacRaider417-Jan-12 4:12
MacRaider417-Jan-12 4:12 
QuestionRounding a calculation to the nearest 0 or 5 Pin
DiesenDesign14-Jan-12 15:48
DiesenDesign14-Jan-12 15:48 
AnswerRe: Rounding a calculation to the nearest 0 or 5 Pin
Aniruddha Loya14-Jan-12 20:53
Aniruddha Loya14-Jan-12 20:53 
GeneralRe: Rounding a calculation to the nearest 0 or 5 Pin
DiesenDesign15-Jan-12 14:07
DiesenDesign15-Jan-12 14:07 
GeneralRe: Rounding a calculation to the nearest 0 or 5 Pin
Aniruddha Loya15-Jan-12 19:27
Aniruddha Loya15-Jan-12 19:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.