Avance Zone

Technical Experts Zone Blogs

javascript page redirect

You can add this Meta tag :

<meta http-equiv=”Refresh” content=”8;URL=http:// www.example.com/somepage.html”>

Calling A javaScript functionwith Time and Delay :

<body onload=”timer=setTimeout(’callme()’,100)”>
<script language=”JavaScript”>
<!–
var time = null
function callme() {
window.location = ‘http://www.avancezone.com’
}
//–>
</script>

Insert The Body tag and the function CALLME will be call in 100ms and your page will be redirected to other .

To redirect the page immediately by script :

<script type="text/javascript">
<!--
window.location = "http://www.google.com/"
//-->
</script>

ASP.Net tablecell add image

Here are the steps to add a image dynamically to a table cell in asp.net

tc1 = New TableCell
‘tc1.Text = dr1.Item(6)
If (dr1.Item(6) = 2) Then
tc1.Text = “<img src=images/image1.bmp >”
End If
If (dr1.Item(6) = 1) Then
tc1.Text = “<img src=images/image2.bmp >”
End If
If (dr1.Item(6) = 0) Then
tc1.Text = “<img src=images/image3.bmp >”
End If

Here “tc1″ is the table cell i declared and dr1 is some array item.. Just insert it with any condition and play with your code.

|