Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Jquery Buttons and ASP:Buttons

  1. #1
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Default Jquery Buttons and ASP:Buttons

    Hi

    I am looking to change the look and feel of the Buttons by applying the JQUERY UI script.

    So far I have managed to change the Product page button addtocart


    template.ascx
    HTML Code:
    <link type="text/css" href="css/smoothness/jquery-ui-1.8.1.custom.css" rel="stylesheet" />	
    <script type="text/javascript" src="js_lib/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="js_lib/jquery-ui-1.8.1.custom.min.js"></script>
    <script type="text/javascript">
    	$(function() {
    		$("button, input:button, a", ".demo").button();
    		
    	});
    </script>
    Source code
    HTML Code:
    tmpS.Append("<div class=\"demo\">");
    tmpS.Append("<input type=\"button\" value = AGGIUNGI onClick=\"document." ....
    tmpS.Append("</div>");

    but I am finding some problems on changing the buttons in the signin.aspx page where the button is created in another way.


    HTML Code:
    <asp:Button ID="LoginButton" type="button"  OnClick="LoginButton_Click" runat="server" Text="login"  ValidationGroup="Group1">
    </asp:Button>

    I wonder if someone has developed this in the past or has an idea on how make it work.

    Thank you

    I am using version 8
    Last edited by snowy; 05-27-2010 at 06:02 AM.

  2. #2
    travisalmand is offline Junior Member
    Join Date
    Mar 2010
    Posts
    24

    Default

    Looking at the HTML source for that page it appears that the button is a submit type of input and not just a standard button.

    Therefore you would probably to put input:submit or input[type='submit'] in your jQuery code as the target for the button.

    Or just target it according to its id.

  3. #3
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Default

    Thank you very much your tip worked perfectly!!!