How to put java script....
-
Hi all, I want to put this java script ["window.open('Organization.aspx','mywindow','width=750,height=600')"; ] in treeview event TreeView1_SelectedNodeChanged1 so that on click of every node or sub node this window would open.. help me out please thanx
never let you down...always be happy..
-
Hi all, I want to put this java script ["window.open('Organization.aspx','mywindow','width=750,height=600')"; ] in treeview event TreeView1_SelectedNodeChanged1 so that on click of every node or sub node this window would open.. help me out please thanx
never let you down...always be happy..
try this
if (!IsPostBack)
{
TreeNode Parentnode = new TreeNode("Home");
TreeNode node = new TreeNode("Organization","","","'Organization.aspx","_blank");
//node.NavigateUrl = "javascript:window.open('Organization.aspx','mywindow','width=750,height=600');";
Parentnode.ChildNodes.Add(node);
TreeView1.Nodes.Add(Parentnode);
} -
Hi all, I want to put this java script ["window.open('Organization.aspx','mywindow','width=750,height=600')"; ] in treeview event TreeView1_SelectedNodeChanged1 so that on click of every node or sub node this window would open.. help me out please thanx
never let you down...always be happy..
Hi gaurav Try this
if (!IsPostBack)
{
TreeView1.Attributes.Add("onclick", "javascript:window.open('Organization.aspx.aspx','mywindow','width=750,height=600');");
}himanshu
-
try this
if (!IsPostBack)
{
TreeNode Parentnode = new TreeNode("Home");
TreeNode node = new TreeNode("Organization","","","'Organization.aspx","_blank");
//node.NavigateUrl = "javascript:window.open('Organization.aspx','mywindow','width=750,height=600');";
Parentnode.ChildNodes.Add(node);
TreeView1.Nodes.Add(Parentnode);
} -
Hi gaurav Try this
if (!IsPostBack)
{
TreeView1.Attributes.Add("onclick", "javascript:window.open('Organization.aspx.aspx','mywindow','width=750,height=600');");
}himanshu
-
I want it in a way like if i click ANY node or sub node then this window wud appear. through your code even i click joints of nodes then this window is appearing.. Thank You
never let you down...always be happy..
Hi, May be this solve your problem
protected void TreeView1\_SelectedNodeChanged(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN\_WINDOW", "window.open( 'http://www.google.com','mywindow','width=750,height=600' );", true); }
himanshu
-
Hi, May be this solve your problem
protected void TreeView1\_SelectedNodeChanged(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN\_WINDOW", "window.open( 'http://www.google.com','mywindow','width=750,height=600' );", true); }
himanshu
protected void TreeView1_SelectedNodeChanged1(object sender, EventArgs e) { Response.Write("<script>window.open('group.aspx?id=" + TreeView1.SelectedValue + "','mywindow','width=200,height=200')</script>"); } This is the answer.. its working fine...!! thanx a lot.
never let you down...always be happy..
-
Hi all, I want to put this java script ["window.open('Organization.aspx','mywindow','width=750,height=600')"; ] in treeview event TreeView1_SelectedNodeChanged1 so that on click of every node or sub node this window would open.. help me out please thanx
never let you down...always be happy..