ラベル rollover の投稿を表示しています。 すべての投稿を表示
ラベル rollover の投稿を表示しています。 すべての投稿を表示

2012年3月24日土曜日

Rollover Overlay

What's up all,
Is there any kind of tool in the kit for the "rollover overlay" like on the "Showcase" page on this site. When you rollover the site it overlays the description of the site? Or if you go to Netflix, rollover any of the movies and you will see it also.

Just wondering cause I can't seem to find anything like it included in the toolkit.

Thanks!

Forget it. I am an idiot...After more thought, I figured out how to do it with the current controls.

Rollovers with update panel not working?

Hello all,

I got a master page which containsjavascript generated by imageready for the rollover effect. I have acontent page which contains textbox, image button, updatepanel (Atlas)with Partial Rendering=True and gridview. Everything works fine in thebeginning. But once I sort, filter the grid view, the grid viewchanges as it should but now my rollovers don't work. I seems that thefunction that the onmouseover is not firing. I can still mess with thegridview that works fine. Oh yea the image button also has rolloverstate, that works but that is not calling the imageready function. Ithas inline javascript onmouserover="this.src='imgOver.gif';". I'malittle confused why the functions are not firing after the callback. Any ideas will be appreciated.

Thank YouPhotoshop's generated javascript uses a global boolean variable calledpreloadFlag. It sets this value to false globally, so I guess when a call back happens this line was being executed and sset back to false from being true. So none of the rollovers worked. I set it to true and the roll overs worked.

Hi boricua,

Here's a procedure you can adapt to your needs. Just call it for each ImageButton from the Page_Load. I've only tested this on IE 6, so let me know if it gives you any trouble.

ProtectedSub Page_Load(ByVal senderAsObject,ByVal eAs System.EventArgs)HandlesMe.LoadIfNot (Page.IsPostBack)Then

rollover3State(imgArrowLeft,

"ArrowLeft")
rollover3State(imgArrowRight,"ArrowRight")EndIfEndSubProtectedSub rollover3State(ByVal btnObjectAs ImageButton,ByVal baseImageAsString)

btnObject.Attributes.Add(

"onmouseout","{this.src='" &Me.ResolveUrl("App_Themes/" &Me.StyleSheetTheme &"/images/btn_" & baseImage &"_0.gif") &"';}")

btnObject.Attributes.Add(

"onmouseover","{this.src='" &Me.ResolveUrl("App_Themes/" &Me.StyleSheetTheme &"/images/btn_" & baseImage &"_1.gif") &"';}")

btnObject.Attributes.Add(

"onmousedown","{this.src='" &Me.ResolveUrl("App_Themes/" &Me.StyleSheetTheme &"/images/btn_" & baseImage &"_2.gif") &"';}")EndSub

Yeah this works. I used this method on some pages that I manually created, but for the ones that the html was created by imageready, which creates the javascript as well I fixed with the method I described earlier thank you dbDan.