How to insert blink in a datalist?

Posted by Sridevi under ASP.NET on 7/16/2012 | Points: 10 | Views : 1772 | Status : [Member] | Replies : 5
I have a datalist in which i have one image,three labels , in this i want only one label to blink. I have designed the datagrid as a table. How to make only one label blink now?

Regards,
SRi.

Sridevi


Responses

Posted by: Dotnetrajanikanth on: 7/16/2012 [Member] Starter | Points: 25

Up
0
Down
For making a label blink just give the CSS property

{

text-decoration:blink
}


This will make the label to blink.. I have Tested this in mozilla firefox and it works.

____________
www.flickr.com/photos/psdesigner/

Sridevi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 7/16/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
share your code....
or refer this url.

http://www.dotnetfunda.com/codes/code2794-how-to-blink-a-text-on-ie-browser.aspx

Sridevi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sridevi on: 7/18/2012 [Member] Starter | Points: 25

Up
0
Down
<form id="form1" runat="server">
<div>

<asp:DataList ID="DataList1" runat="server" RepeatColumns="4"
onitemcommand="DataList1_ItemCommand"
onselectedindexchanged="DataList1_SelectedIndexChanged">
<ItemTemplate><asp:Panel ID="Panel1" runat="server" BorderColor="#FF9933"
BorderWidth="3px" Height="380px" Width="270px">
<table height="150" >
<tr >
<td width="75%" style="color: #FF0000; font-weight: bold" align="center">
<asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("ProductImage") %>'></asp:Image>
</td>
</tr>
<tr >
<td width="75%" style="color: #0000FF; font-weight: bold">
<asp:Label ID="lbl" runat="server" Text='<%# Eval("ProductName") %>'></asp:Label></td></tr>
<tr class="style1" >
<td width="50%" style="color: #009900; font-weight: bold" >
<span style="color: Black; font-weight: bold;">ProductDetails:</span><br />
<asp:Label ID="lbl2" runat="server" Text='<%#Eval("ProductDescription") %>'></asp:Label>
</td>
</tr>
<tr >
<td width="75%" style="color: #FF0000; font-weight: bold"><span style="color: Black; font-weight: bold;">Price:</span>
<br /><asp:Label ID="lbl3" runat="server" Text='<%#Eval("ProductCost") %>'></asp:Label>
</td>
</tr>
<tr >
<td align="Right">
<asp:LinkButton ID="LinkButton1" runat="server"
Font-Underline="False" style="font-weight: 700; color: Black" CommandName="ViewDetails" CommandArgument='<%#Eval("ProductId") %>' BackColor="#FF9933">ViewDeatils</asp:LinkButton>
</td></tr>

</table> </asp:Panel>
</ItemTemplate>

</asp:DataList>

this is my code and i want to blink only lbl2 label. How shall i do it? please explain

Sridevi

Sridevi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 7/18/2012 [Member] Starter | Points: 25

Up
0
Down
Sridevi,

Did you try the first reply to your post?

____________
www.flickr.com/photos/psdesigner/

Sridevi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 7/18/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
Try this

    <script type="text/javascript">

function doBlink() {
var blink = document.all.tags("BLINK")
for (var i = 0; i < blink.length; i++)
blink.style.visibility = blink.style.visibility == "" ? "hidden" : ""
}
function startBlink() {
if (document.all) setInterval("doBlink()", 500)
}
window.onload = startBlink;
</script>
<style type="text/css">
blink
{
-webkit-animation-name: blink;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
-webkit-animation-duration: 1s;
}
</style>

<form id="form1" runat="server"> 

<div>

<asp:DataList ID="DataList1" runat="server" RepeatColumns="4"
onitemcommand="DataList1_ItemCommand"
onselectedindexchanged="DataList1_SelectedIndexChanged">
<ItemTemplate><asp:Panel ID="Panel1" runat="server" BorderColor="#FF9933"
BorderWidth="3px" Height="380px" Width="270px">
<table height="150" >
<tr >
<td width="75%" style="color: #FF0000; font-weight: bold" align="center">
<asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("ProductImage") %>'></asp:Image>
</td>
</tr>
<tr >
<td width="75%" style="color: #0000FF; font-weight: bold">
<asp:Label ID="lbl" runat="server" Text='<%# Eval("ProductName") %>'></asp:Label></td></tr>
<tr class="style1" >
<td width="50%" style="color: #009900; font-weight: bold" >
<span style="color: Black; font-weight: bold;">ProductDetails:</span><br />
<blink>
<asp:Label ID="lbl2" runat="server" Text='<%#Eval("ProductDescription") %>'></asp:Label> </blink>
</td>
</tr>
<tr >
<td width="75%" style="color: #FF0000; font-weight: bold"><span style="color: Black; font-weight: bold;">Price:</span>
<br /><asp:Label ID="lbl3" runat="server" Text='<%#Eval("ProductCost") %>'></asp:Label>
</td>
</tr>
<tr >
<td align="Right">
<asp:LinkButton ID="LinkButton1" runat="server"
Font-Underline="False" style="font-weight: 700; color: Black" CommandName="ViewDetails" CommandArgument='<%#Eval("ProductId") %>' BackColor="#FF9933">ViewDeatils</asp:LinkButton>
</td></tr>

</table> </asp:Panel>
</ItemTemplate>

</asp:DataList>


Sridevi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response