473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Prevent TreeView PostBack When Click the Little Plus Sign (expand)


Hi.

Can somebody tell me how to prevent a postback
when I click on the little "plus" sign next to the
treenode's root folder? It postbacks and I have to
restart a video stream coming to the page via an
iframe.

I have tried javascript:void(0) and that doesn't work.

anybody?

thanks.
Nov 27 '07 #1
2 3933
On Nov 27, 10:12 am, pbd22 <dush...@gmail.comwrote:
Hi.

Can somebody tell me how to prevent a postback
when I click on the little "plus" sign next to the
treenode's root folder? It postbacks and I have to
restart a video stream coming to the page via an
iframe.

I have tried javascript:void(0) and that doesn't work.

anybody?

thanks.
I didn't want to deal with that either so I wrote my own treeview
using javascript.

First I put a Plus/Minus image box in front of a div then added all
the nodes to the div as labels
Then when someone clicks the div I change the image to the plus/minus
and expand/contract the div by setting all the subnodes visibility to
visible and position to static for plus and visibility to hidden and
position to absolute for minus

The position absolute will allow the div directly below that one to
move up into the blank space then when static is put back everything
returns to its rightful place.

Nov 27 '07 #2
On Nov 27, 12:13 pm, "cfps.Christian" <ge0193...@otc.eduwrote:
On Nov 27, 10:12 am, pbd22 <dush...@gmail.comwrote:
Hi.
Can somebody tell me how to prevent a postback
when I click on the little "plus" sign next to the
treenode's root folder? It postbacks and I have to
restart a video stream coming to the page via an
iframe.
I have tried javascript:void(0) and that doesn't work.
anybody?
thanks.

I didn't want to deal with that either so I wrote my own treeview
using javascript.

First I put a Plus/Minus image box in front of a div then added all
the nodes to the div as labels
Then when someone clicks the div I change the image to the plus/minus
and expand/contract the div by setting all the subnodes visibility to
visible and position to static for plus and visibility to hidden and
position to absolute for minus

The position absolute will allow the div directly below that one to
move up into the blank space then when static is put back everything
returns to its rightful place.
Care to share your code? :)
Nov 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: feel | last post by:
Goin' crazy with this recursive function ported from delphi... I send a string like DirA/ DirB /DirC but i get in the treeView each one in a new node.Cant get the child node....!! -DirA -DirB...
1
by: Jürgen Müllder | last post by:
Hi! I have a TreeView in my Application. I have the MouseDown Attached to the TreeView. When i click at a Node it makes that what it should. But when i Expand a Node by clicking at the Plus Sign...
2
by: clsmith66 | last post by:
In a treeview, I am trying to store the index of every treenode as it expands in a hidden input box. If I click on the node itself, it expands and I can capture the node index no problem. If I...
17
by: Spam Trap | last post by:
I am upgrading from VB6 where I had access to a treeview NodeClick event (see below)... but now VB.NET does not have this any more. Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)...
2
by: B-Dog | last post by:
I was trying to use the treeview and was wondering if there was a way to make the treeview select the node when you click the plus sign next to it. The only way I've found to do it is to actually...
8
by: Shawn B. | last post by:
Greetings, I'm creating a little program that acts as a glorified Registry explorer. The TreeView doesn't allow you to show a plus sign unless a node has child nodes, so I need to determine...
2
by: Tymbow | last post by:
I'm building a web application that is analogous to the Windows XP file explorer in function. The left column contains a TreeView, and the right column a DataGrid populated by selecting TreeView...
8
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the...
26
by: JJ | last post by:
Is there any way you can expand a parent node on the treeview control _without a postback_ by clicking on the node text (NOT clicking the expand image URL) ? I want to format the treeview node...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.