|
|
|
|
|
для: cardinal1980
(20.12.2007 в 13:40)
| | Как я выяснил через дебагер и view source
Страница через view source не содержит моих изменений, несмотря на то, что в броужере я их вижу, соответсвенно обработчики событий не зарегистрированны в броузере.
Мне нужно понять как записать нувую страницу в броузер. | |
|
|
|
|
|
|
|
для: bronenos
(20.12.2007 в 13:27)
| | <%@ Page Language="C#" AutoEventWireup="true" Codebehind="treeview.aspx.cs" Inherits="TESTWEB.treeview" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Treeview</title>
<script language="javascript" type="text/javascript">
function Registr(sender,e)
{
checkBoxTree = document.getElementById("TreeView1n17CheckBox");
checkBox = document.getElementById("Checkbox1");
textBox1 = document.getElementById("Text1");
textBox1.Text = checkBoxTree.title;
textBox1.innerText = checkBoxTree.title;
checkBoxTree.status = true;
checkBoxTree.onclick = "DeselectNode()";
checkBox.onclick="DeselectNode()";
document.onClick = DeselectNode;
}
function SelectedNodes()
{
checkBoxTree = document.getElementById("TreeView1n17CheckBox");
checkBox = document.getElementById("Checkbox1");
textBox1 = document.getElementById("Text1");
textBox1.Text = checkBoxTree.title;
textBox1.innerText = checkBoxTree.title;
checkBoxTree.status = true;
checkBoxTree.onclick = "DeselectNode()";
checkBox.onclick="DeselectNode()";
}
function DeselectNode(sender, e)
{
checkBoxTree = document.getElementById("TreeView1n17CheckBox");
textBox1 = document.getElementById("Text1");
textBox1.Text = checkBoxTree.title;
textBox1.innerText = checkBoxTree.title;
checkBoxTree.status = false;
}
function DeselectNode()
{
checkBoxTree = document.getElementById("TreeView1n17CheckBox");
textBox1 = document.getElementById("Text1");
textBox1.Text = checkBoxTree.title;
textBox1.innerText = checkBoxTree.title;
checkBoxTree.status = false;
}
</script>
</head>
<body onload="Registr()">
<form id="form1" runat="server">
<div>
<asp:TreeView ID="TreeView1" runat="server">
</asp:TreeView>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Выбрать" OnClientClick="SelectedNodes()" />
<input id="Button2" type="button" value="Choose" onclick="SelectedNodes()" />
<asp:HiddenField ID="HiddenField1" runat="server" />
<input id="Text1" type="text" />
<br />
<input id="Checkbox1" type="checkbox" /></div>
</form>
</body>
</html> | |
|
|
|
|
|
|
|
для: cardinal1980
(20.12.2007 в 13:25)
| | мб код... | |
|
|
|
|
|
|
| Столкнулся со следующей проблемой: нужно обрабатывать событие onclick для checkBox из treeview (скриптом). В onLoad скриптом цепляю события на объекты, но обработчик не работает.
Подскажите почему? и как сделать чтобы работал?
treeview - это серверный контрол, который на странице выглядит как набор checkbox'ов. | |
|
|
|
|