i am using a javascript fuction for light box and pass variable
<a href="#" onclick="vipin('<%# Eval("flightid") %>',0)" ><asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="images/book1.gif" />a>
now i want to give filghtid in a label but when i insert the code in javascript funtion lightbox did not show the javacript is
function gradient(id, level)
{
var box = document.getElementById(id);
box.style.opacity = level;
box.style.MozOpacity = level;
box.style.KhtmlOpacity = level;
box.style.filter = "alpha(opacity=" + level * 100 + ")";
box.style.display="block";
return;
}
function fadein(id)
{
var level = 0;
while(level <= 1)
{
setTimeout( "gradient('" + id + "'," + level + ")", (level* 1000) + 10);
level += 0.01;
}
}
// Open the lightbox
function openbox(formtitle, fadin )
{
var box = document.getElementById('box');
document.getElementById('filter').style.display='block';
var btitle = document.getElementById('boxtitle');
btitle.innerHTML = formtitle;
if(fadin)
{
gradient("box", 0);
fadein("box");
}
else
{
box.style.display='block';
}
document.getElementById('Label1').value=formtitle;
}
// Close the lightbox
function closebox()
{
document.getElementById('box').style.display='none';
document.getElementById('filter').style.display='none';
}
function vipin (formtitle, fadin )
{
openbox(formtitle, fadin );
}
please see it and tell me solution
Loading

Manikavelu VelayuthamRank #413 · 6K reputationPosted Aug 30, 2010, 3:42 AM EDT
It should work, because label control will be generated as SPAN html tag, it dont have the value properties. so we need to assign it to the innerText.
Mark this post as answered, if this post really helps you.
vipin saini87 reputationPosted Aug 30, 2010, 3:49 AM EDT
Manikavelu VelayuthamRank #413 · 6K reputationPosted Aug 30, 2010, 3:58 AM EDT
vipin saini87 reputationPosted Aug 30, 2010, 4:24 AM EDT
this line is not working i put alert once before it and once after is before give responce but after do not give responce.
hariom26 reputationPosted Sep 6, 2010, 1:34 AM EDT
by :document.getElementById('Label1').innerHtml=formtitle;