472,146 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 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 3855
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by feel | last post: by
1 post views Thread by Jürgen Müllder | last post: by
2 posts views Thread by clsmith66 | last post: by
2 posts views Thread by B-Dog | last post: by
8 posts views Thread by Shawn B. | last post: by
8 posts views Thread by Matt MacDonald | last post: by
26 posts views Thread by JJ | last post: by
reply views Thread by leo001 | last post: by

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.