CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 3/6/2007 12:40:48 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 21 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
luckymaheshwari
Asp.Net User
TreeView and Javascript3/6/2007 12:40:48 PM

0/0

Hey All,

I have a TreeView Control in my form

I have given text and value to each node. Now when a user selects a node I need to show the value in the textbox (placed on the form).

Can I do this without posting back using the javascript ? How?

 Thanx in advance for help.

Nitin  

 

SGWellens
Asp.Net User
Re: TreeView and Javascript3/6/2007 7:18:22 PM

0/0

 
<script language="javascript" type="text/javascript">

function treeViewClick(event)
{
    // get the textbox by it's "mangled" name
    MyTextBox = document.getElementById('<%= MyTextBox.ClientID %>');
    if (MyTextBox == null)
        return;
        
    // only respond when tree nodes are clicked 
    // (nodes use the SPAN tag)
    if (event.srcElement.tagName != "SPAN")
        return;
        
    MyTextBox.value = event.srcElement.innerText
}

</script>


   <asp:TreeView ID="TreeView1" runat="server" onclick="treeViewClick(event);" >
        <Nodes>
            <asp:TreeNode Text="asdff" Value="New Node" SelectAction="None"></asp:TreeNode>
            <asp:TreeNode Text="sdfgsdfg" Value="New Node" SelectAction="None"></asp:TreeNode>
 
 
Steve Wellens
luckymaheshwari
Asp.Net User
Re: TreeView and Javascript3/8/2007 9:34:32 AM

0/0

SGWellens:
 
<script language="javascript" type="text/javascript">

function treeViewClick(event)
{
// get the textbox by it's "mangled" name
MyTextBox = document.getElementById('<%= MyTextBox.ClientID %>');
if (MyTextBox == null)
return;

// only respond when tree nodes are clicked
// (nodes use the SPAN tag)
if (event.srcElement.tagName != "SPAN")
return;

MyTextBox.value = event.srcElement.innerText
}

</script>


<asp:TreeView ID="TreeView1" runat="server" onclick="treeViewClick(event);" >
<Nodes>
<asp:TreeNode Text="asdff" Value="New Node" SelectAction="None"></asp:TreeNode>
<asp:TreeNode Text="sdfgsdfg" Value="New Node" SelectAction="None"></asp:TreeNode>

 

 

thanx for your reply 

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Pro ASP.NET 2.0 in VB 2005: special edition. Authors: Laurence Moroney, Matthew MacDonald, Pages: 1360, Published: 2006
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
Creating Client Extranets with Sharepoint 2003 Authors: Mark E. Gerow, Pages: 216, Published: 2006
Pro Web 2.0 Mashups: Remixing Data and Web Services Authors: Raymond Yee, Pages: 603, Published: 2008
JavaScript: The Missing Manual Authors: David McFarland, David Sawyer McFarland, Pages: 500, Published: 2008
Practical JavaScript, DOM Scripting, and Ajax Projects Authors: Frank Zammetti, Pages: 546, Published: 2007
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Beginning DotNetNuke 4.0 Website Creation in VB 2005 with Visual Web Developer 2005 Express: From Novice to Professional Authors: Nick Symmonds, Pages: 448, Published: 2006

Web:
Treeview JavaScript tree menu Treeview: JavaScript DHTML tree menu that looks and feels like the Windows Explorer tree.
CodeProject: Easy DHTML treeview. Free source code and programming ... A relatively easy implementation of a treeview using DHTML (Client Side Javascript in conjunction with DOM). This implementation is straightforward and ...
jsTree - open source JavaScript treeview control is an open soure treeview control written in JavaScript. I wrote the script for my phpXplorer system. The script is not intended to be a website menu. ...
Download Treeview - JavaScript Tree Menu, Treeview - JavaScript ... Free Treeview - JavaScript Tree Menu Download, Treeview - JavaScript Tree Menu 4.5 Download.
Treeview - JavaScript Tree Menu 4.3 - Treeview, Free JavaScript ... Treeview, Free JavaScript Tree Menu with visual builder tool. IE,NN,Opera,etc. Box picture of software :Treeview - JavaScript Tree Menu. Price: Free ...
Web Treeview Menu JavaScript Client Side Web Treeview Menu JavaScript explained.
In the Trenches : ASP.NET Treeview 2.0, Javascript madness and more Aug 10, 2006 ... What can I say, I’m not happy. First let’s look at sub classing; this must be an issue with more web controls. You would think they (ASP.
Re: Sorting custom tree view with javascript: msg#00088 Next by Date: Re: Update: Delphi routines for Mozilla javascript engine, Jon Robertson. Previous by Thread: Sorting custom tree view with javascript, ...
Build A JavaScript Tree Control Treeview.net JavaScript Applet • Easy DHTML Treeview at CodeProject. TALK BACK. HTML and JavaScript-based trees are becoming more common every day. ...
DHTML Treeview component




Search This Site:










wizard data and postbacks

web.sitemap + navigation control

get a control in wizard headertemplate

how to make child links to my "admin" link on the master page?

menu control don't show the selected item

theme applied, every control not working!!!help!!!

using master page controls within the code of the content page

problem with asp:menu

passing masterpage value dynamically using session or cookie?

many themes, one css file

skin for gridviewrow

background image on a masterpage

javascipt in a content page

homepage without master page but the other pages have

vwd 2008 master page ?

treeview + style

[how to] skin a validatorcalloutextender

a question on treeview

ugly masterpage markup fix?

page last updated date

menu creation in asp.net2.0

specific css stylesheet to associate with skinfile

cancel treeview node selection

profiles not working

displaying a text box next to tree node

master pages + file path

can't link to css from master page?

navigation : menu : menu is under labels

how to expand a treenode

edit of stylesheet does not change page

  Privacy | Contact Us
All Times Are GMT