0

I am using a script on a page due to which the style of dropdown , checkbox and textbox is applied on them, but if i put dropdown or any other tool inside the updatepanel than only when the page gets load script is shown to that tool but whenever one of the tool gets refresh with the other selectchange of tool which is also inside the updatepanel than both of the script gets removed.

For example:

       <head runat="server">
        <title>script not working</title>      
        <script src="js/jquery/jquery-1.4.1.min.js" type="text/javascript"></script>
        <link rel="stylesheet" href="jqtransformplugin/jqtransform.css" type="text/css" media="all" />
        <script type="text/javascript" src="jqtransformplugin/jquery.jqtransform.js"></script>

        <script language="javascript">
            $(function() {
                $('form').jqTransform({ imgPath: 'jqtransformplugin/img/' });
            });
        </script>
        </head>
        <body>
        <form id="form1" runat="server">    
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <asp:ScriptManager ID="ScriptManager1" runat="server">
                        </asp:ScriptManager>                 
                    </td>               
                </tr>
                <tr>
                    <td>
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                                    <asp:ListItem>1</asp:ListItem>
                                    <asp:ListItem>2</asp:ListItem>
                                    <asp:ListItem>3</asp:ListItem>
                                    <asp:ListItem>4</asp:ListItem>
                                    <asp:ListItem>5</asp:ListItem>
                                    <asp:ListItem></asp:ListItem>
                                </asp:DropDownList>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>               
                </tr>            
                <tr>               
                    <td>
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                                <asp:DropDownList ID="ddtrial" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="ddtrial_SelectedIndexChanged">
                                    <asp:ListItem>1</asp:ListItem>
                                    <asp:ListItem>2</asp:ListItem>
                                    <asp:ListItem>3</asp:ListItem>
                                    <asp:ListItem>4</asp:ListItem>
                                    <asp:ListItem>5</asp:ListItem>
                                    <asp:ListItem></asp:ListItem>
                                </asp:DropDownList>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>           
            </table>   
        </form>
        </body>

I am facing 1 problems:

1--When the page gets load script is applied to the dropdown is shown but whenever one of the dropdown selectchanges both of the dropdown script gets removed.

Edited by mitesh.24jain: text

2
Contributors
3
Replies
13
Views
4 Years
Discussion Span
Last Post by mitesh.24jain
0

I had tried looking on this but as i m the starter was not able to understand.
Is there any other way to make me understand.

0

1 more thing i forgot to say that i want the below script to be call in updatepanel and u can see that this script has the id of form if i used to write the id of dropdown in place of form it is showing me an error.

<script language="javascript">
$(function() {
$('form').jqTransform({ imgPath: 'jqtransformplugin/img/' });
});
</script>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.