• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

GAlton
#1 Posted : Wednesday, February 24, 2010 11:41:46 PM(UTC)
GAlton

Rank: Member

Joined: 6/10/2004(UTC)
Posts: 101

How to you add a rollover/mouseover effect for the buttons?
Kman
#2 Posted : Thursday, February 25, 2010 12:53:41 AM(UTC)
Kman

Rank: Member

Joined: 11/25/2003(UTC)
Posts: 370

http://www.webvamp.co.uk/blog/coding/css-image-rollovers/

Lots of tutorials via Google search. This one is pretty good.
Regards,
Kim(Kman) Rossey
www.toocoolwebs.com
BVSoftware - MerchantTribe Programming/Design, Database Programming and Business Applications
[email protected]
GAlton
#3 Posted : Saturday, February 27, 2010 10:17:17 AM(UTC)
GAlton

Rank: Member

Joined: 6/10/2004(UTC)
Posts: 101

Yes, I do like this. I can do this but the buttons I'm dealing with are not straight css/html and therefor don't look like this. Here is what I have to deal with:

<anthem:ImageButton id="btnAdd" runat="server" AlternateText="Add to Cart" ImageUrl="~/BVModules/Themes/Bvc5/Images/Buttons/AddToCart.png" EnabledDuringCallBack="False" EnableCallBack="false"></anthem:ImageButton>
<asp:ImageButton ID="btnSaveChanges" runat="server" AlternateText="Add to Cart" ImageUrl="~/BVModules/Themes/Bvc5/images/Buttons/SaveChanges.png" Visible="False"/>

How do I create a rollover effect with this code?
Kman
#4 Posted : Saturday, February 27, 2010 12:34:59 PM(UTC)
Kman

Rank: Member

Joined: 11/25/2003(UTC)
Posts: 370

Although in you source this id is id="btnAdd" it will not be that when it is rendered. So you will have to look at your view source in your browser to see what the rendered id is. Once you have that you can change the mouseover image. Some helpful tools would be FireFox with the Firebug add on and then the jQuery library to manipulate the DOM. There are a number of approaches but the first step is knowing the rendered ID of whatever you are trying to change. With current versions of ASP.Net it will not be the same as your source when using ASP.Net controls.
Regards,
Kim(Kman) Rossey
www.toocoolwebs.com
BVSoftware - MerchantTribe Programming/Design, Database Programming and Business Applications
[email protected]
GAlton
#5 Posted : Saturday, February 27, 2010 1:24:29 PM(UTC)
GAlton

Rank: Member

Joined: 6/10/2004(UTC)
Posts: 101

Kim,

Okay, most of that went over my head - just to give you a heads-up on my coding abilities. Here is the id info as captured using view source:

id="Anthem_ctl00_MainContentHolder_AddToCartButton1_btnAdd__"><input type="image" name="ctl00$MainContentHolder$AddToCartButton1$btnAdd" id="ctl00_MainContentHolder_AddToCartButton1_btnAdd" src="/BVModules/Themes/Bvc5/images/buttons/AddToCart.png" alt="Add to Cart" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainContentHolder$AddToCartButton1$btnAdd&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" style="border-width:0px;" /></span>

Seems like it's not going to be as easy as I would like.
shanplourde
#6 Posted : Sunday, October 3, 2010 7:52:09 PM(UTC)
shanplourde

Rank: Member

Joined: 9/19/2010(UTC)
Posts: 104

You should be able to assign a CSS class to any ASP.NET or most Anthem controls. I've added CssClass="xyz" to the source below as an example:

<anthem:ImageButton id="btnAdd" runat="server" CssClass="class-name" AlternateText="Add to Cart" ImageUrl="~/BVModules/Themes/Bvc5/Images/Buttons/AddToCart.png" EnabledDuringCallBack="False" EnableCallBack="false"></anthem:ImageButton>

I find this approach makes it easier to wire up CSS and jQuery versus relying on the ASP.NET control ids.
Best regards,
Shan Plourde
www.pahsah.com
+1 (416) 628-1280
--------------------------------
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012