468,514 Members | 1,697 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,514 developers. It's quick & easy.

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 3651
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 NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.