hello,
this is my javascript for popup window
<
script language="JavaScript">
var w = window.open("http://localhost:5050/remotemeter/watermeter.aspx",'Srihari','toolbar=no,width=220,height=210');
w.window.focus();
</
script>
i have two buttons in asp.net page(update and live)
when i click on live button the javascript is executed the page was open,but problem is when i click on update again javascript running the again page was open.
in page load i put this code for update button
protected void Page_Load(object sender, EventArgs e)
{
btnup.Attributes.Add("onclick","JavaScript:document.forms[0].reset(); return false;");
}
the update button code like below
protected void btnup_Click(object sender, EventArgs e)
{
int recptr;SqlConnection con = new SqlConnection("server=localhost;initial catalog=online_application1;user id=sa;pwd=");
con.Open();
string st = "select * from packet";DataSet ds = new DataSet();
DataRow dr;DataTable dt;
SqlDataAdapter da = new SqlDataAdapter(st, con);da.Fill(ds, "packet");
dt = ds.Tables[0];
recptr = dt.Rows.Count - 1;
dr = dt.Rows[recptr];
lblrate.Text = dr[0].ToString();
lblttl.Text = dr[1].ToString();
lbltime1.Text = dr[2].ToString();
lbldate1.Text = dr[3].ToString();
con.Close();
}
when i click on update every time data will change .
but using this code
btnup.Attributes.Add("onclick","JavaScript:document.forms[0].reset(); return false;");
only once the page will post back.
my requirement is when iclick on update every time data is updated and when iclick on live the path will be open.
plz help me