Click here to Skip to main content
16,014,392 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: GridView DataBind, Adds an extra row to the gridview. Pin
N a v a n e e t h9-Jul-09 20:33
N a v a n e e t h9-Jul-09 20:33 
GeneralRe: GridView DataBind, Adds an extra row to the gridview. Pin
AB77719-Jul-09 21:03
AB77719-Jul-09 21:03 
QuestionJavascript not firing in checkbox change Pin
meeram3959-Jul-09 19:51
meeram3959-Jul-09 19:51 
AnswerRe: Javascript not firing in checkbox change Pin
AB77719-Jul-09 20:33
AB77719-Jul-09 20:33 
AnswerRe: Javascript not firing in checkbox change Pin
N a v a n e e t h9-Jul-09 20:48
N a v a n e e t h9-Jul-09 20:48 
GeneralRe: Javascript not firing in checkbox change Pin
meeram3959-Jul-09 21:15
meeram3959-Jul-09 21:15 
GeneralRe: Javascript not firing in checkbox change Pin
N a v a n e e t h9-Jul-09 21:24
N a v a n e e t h9-Jul-09 21:24 
GeneralRe: Javascript not firing in checkbox change Pin
meeram3959-Jul-09 21:57
meeram3959-Jul-09 21:57 
I have removed the panel control and I put an id to row.Now it is working fine. Following is the codew:

<tr><td class="labeltext"><asp:CheckBox ID="chkCopyPermissions" runat="server" Text = "CopyPermissions"
OnClick="SetCopyPermissionsControlState('CopyPermissionsRow',this)" /></td>
<td><asp:Label ID="lblCopyPermissionMessage" runat="server" ></asp:Label></td>
</tr>
<tr id="CopyPermissionsRow" visible="false">
<td class="labeltext">
<asp:Label ID = "lblCopyPermissions" runat = "server" Text = "Existing UserName" ></asp:Label>
</td>
<td>
<asp:TextBox id = "ExistingLoginTextBox" runat="server" TextMode="SingleLine" MaxLength="50"></asp:TextBox>
<asp:Button ID = "CopyPermissionsButton" runat="server" Text="Copy" OnClick="CopyPermissionsButton_Click" />
</td>
</tr>

Because of the above change, the javascript function , SetCopyPermissionsControlState, is firing now. But the issue is, I made it visible=false when the page loads which is not happening. The page loads by displaying the controls. However, when I check the checkboxes, it is changing accordingly. Any idea why it is not happening for the first time?

I don't want postback, because there is a password textbox in the form which erases the value on postback.

Following is my javascript function:
function SetCopyPermissionsControlState(rowControlId, checkBox) {

            var enabled = checkBox.checked;
            alert("enabled" + enabled);
            var rowControl = document.getElementById(rowControlId);
            alert("panelControl" + rowControl);

            if (rowControl) 
            {
                if (enabled) 
                {
                    rowControl.style.display = '';
                    
                }
                else 
                {
                    rowControl.style.display = 'none';
                  
                }
            }

        }


Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.

AnswerRe: Javascript not firing in checkbox change Pin
Amit Patel19859-Jul-09 21:44
Amit Patel19859-Jul-09 21:44 
GeneralRe: Javascript not firing in checkbox change Pin
meeram3959-Jul-09 22:23
meeram3959-Jul-09 22:23 
QuestionHyperlink Pin
the_smiths9-Jul-09 19:36
the_smiths9-Jul-09 19:36 
AnswerRe: Hyperlink Pin
syaiful_869-Jul-09 20:39
syaiful_869-Jul-09 20:39 
GeneralRe: Hyperlink Pin
the_smiths9-Jul-09 20:45
the_smiths9-Jul-09 20:45 
GeneralRe: Hyperlink Pin
syaiful_869-Jul-09 20:46
syaiful_869-Jul-09 20:46 
QuestionProblem of AJAX Timer with UpdatePanel Pin
slSoftware9-Jul-09 18:32
slSoftware9-Jul-09 18:32 
AnswerRe: Problem of AJAX Timer with UpdatePanel Pin
N a v a n e e t h9-Jul-09 20:56
N a v a n e e t h9-Jul-09 20:56 
QuestionResource.resx Need Helpp :( [modified] Pin
syaiful_869-Jul-09 16:03
syaiful_869-Jul-09 16:03 
AnswerRe: Resource.resx Need Helpp :( Pin
N a v a n e e t h9-Jul-09 21:03
N a v a n e e t h9-Jul-09 21:03 
GeneralRe: Resource.resx Need Helpp :( [modified] Pin
syaiful_869-Jul-09 21:46
syaiful_869-Jul-09 21:46 
GeneralRe: Resource.resx Need Helpp :( Pin
N a v a n e e t h9-Jul-09 23:06
N a v a n e e t h9-Jul-09 23:06 
GeneralRe: Resource.resx Need Helpp :( Pin
syaiful_8612-Jul-09 14:37
syaiful_8612-Jul-09 14:37 
GeneralRe: Resource.resx Need Helpp :( Pin
N a v a n e e t h12-Jul-09 16:02
N a v a n e e t h12-Jul-09 16:02 
GeneralRe: Resource.resx Need Helpp :( Pin
syaiful_8612-Jul-09 17:17
syaiful_8612-Jul-09 17:17 
QuestionSiteMap Pin
William Fitzgerald9-Jul-09 14:18
William Fitzgerald9-Jul-09 14:18 
Questionmultiselect listbox - set selections using delimeted string Pin
ublend9-Jul-09 13:02
ublend9-Jul-09 13:02 

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.