treeview client OnClick invalid but still works

J

Joe Stateson

I had thought that checkbox changes in a treeview only work at postback but
I found this code that makes it work (sort of) on client click
http://www.developerfusion.co.uk/forums/p/33913/149877/

I added OnClick="myPostBack();" to
<asp:TreeView ID="TreeView1" runat="server"

Intellisense (visual studio 2005) did not list OnClick as an attribute and
even after coding it up, VS8 underlined OnClick and the VS8 tooltip
indicated it was an invalid attribute, but it actually works, at least in
IE7. It did not work in firefox so it is useless for me.

I wanted to be able to check a branch and have all the leaves get checked
and viceversa. Unchecking one of the leaves I want the branch to be
unchecked but the remaining leaves left as-is. I have code that does this
on the server after a postback, but I had to add an "Apply Clicks" postback
button to make it happen. I would think that something on the client side
should be handleing this. OnClick could be coded to make it happen, but it
seems not be be called by FireFox.


--
======================================================================
Joseph "Beemer Biker" Stateson
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
======================================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top