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

JavaScript

 
GeneralRe: Related to pdf Pin
Richard MacCutchan18-Jan-12 21:31
mveRichard MacCutchan18-Jan-12 21:31 
GeneralRe: Related to pdf Pin
Mohibur Rashid7-Feb-12 19:52
professionalMohibur Rashid7-Feb-12 19:52 
GeneralRe: Related to pdf Pin
Richard MacCutchan7-Feb-12 22:27
mveRichard MacCutchan7-Feb-12 22:27 
QuestionIssuse with window.open Pin
sarang_k18-Jan-12 1:31
sarang_k18-Jan-12 1:31 
AnswerRe: Issuse with window.open PinPopular
Not Active18-Jan-12 1:51
mentorNot Active18-Jan-12 1:51 
AnswerDown voting doesn't help Pin
Not Active18-Jan-12 2:44
mentorNot Active18-Jan-12 2:44 
AnswerRe: Issuse with window.open Pin
AspDotNetDev18-Jan-12 18:12
protectorAspDotNetDev18-Jan-12 18:12 
QuestionUser control - how to access the element using javascript Pin
Member 779716716-Jan-12 12:40
Member 779716716-Jan-12 12:40 
Hi,

I have a PhoneSearch textBox in UserControlA. I want to disable or do not show it. The usercontrolA is being used in another UserControlB and finally the UserControlB is being used in a Test.aspx page. Now when I load the Test.aspx page and when I type in the PhoneSearch textBox the text disappear for the first time. I think some how there is a little page refresh is taking place in the first 3 to 5 seconds. But if I wait for first 5 seconds and then type in then the text stays in the SearchTextBox. So my idea is disable or do not show the Searchtextbox for the first few seconds and I think that may be the solution for page refresh issue (please mention if there is another way we can fix this and code snippet). I am not sure why there is a page refresh is taking place when the page loads of the first time.

Just as a side note the UserControlA and UserControlB both are inside an update panel and test.aspx is using a master page.

I am trying to use the below code in the userControlA as below but no luck
ASP.NET
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Test.ascx.vb" Inherits="...Test" %>

<asp:UpdatePanel ID="SearchUpdatePanel" runat="server" RenderMode ="inline"  UpdateMode="Conditional">
    <ContentTemplate>

<asp:TextBox ID="PhoneSearch" TabIndex="5"  runat="server" Width="160px"/>

<<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>

       <script type="text/javascript"  language="javascript">
           $(document).ready(function () {
               $('<%= PhoneSearch.ClientID%>').show();
               alert('<%= PhoneSearch.ClientID%>');
           });
      </script>
       
    </ContentTemplate>
</asp:UpdatePanel>



I get ctl00_DefaultContent_UserControlB_UserControlA_SearchTextBox in my alert box and the $('<%= PhoneSearch.ClientID%>').show(); doesn't show the text box. Can some one help me with this?

Thanks in advance,
L

modified 17-Jan-12 6:07am.

AnswerRe: User control - how to access the element using javascript Pin
BobJanova17-Jan-12 4:07
BobJanova17-Jan-12 4:07 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716717-Jan-12 5:08
Member 779716717-Jan-12 5:08 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716717-Jan-12 5:30
Member 779716717-Jan-12 5:30 
GeneralRe: User control - how to access the element using javascript Pin
Graham Breach17-Jan-12 6:42
Graham Breach17-Jan-12 6:42 
GeneralRe: User control - how to access the element using javascript Pin
BobJanova17-Jan-12 11:57
BobJanova17-Jan-12 11:57 
GeneralRe: User control - how to access the element using javascript Pin
BobJanova17-Jan-12 6:12
BobJanova17-Jan-12 6:12 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716717-Jan-12 7:33
Member 779716717-Jan-12 7:33 
GeneralRe: User control - how to access the element using javascript Pin
BobJanova17-Jan-12 12:01
BobJanova17-Jan-12 12:01 
GeneralRe: User control - how to access the element using javascript Pin
AspDotNetDev19-Jan-12 7:29
protectorAspDotNetDev19-Jan-12 7:29 
GeneralRe: User control - how to access the element using javascript Pin
BobJanova19-Jan-12 22:57
BobJanova19-Jan-12 22:57 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716720-Jan-12 15:36
Member 779716720-Jan-12 15:36 
AnswerRe: User control - how to access the element using javascript Pin
AspDotNetDev17-Jan-12 7:58
protectorAspDotNetDev17-Jan-12 7:58 
GeneralRe: User control - how to access the element using javascript Pin
Member 779716718-Jan-12 15:45
Member 779716718-Jan-12 15:45 
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 

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.