First, I see you posted this to quite a few locations. Good job..
hehe.. I would have done the same.
Now, here we go.. This is working for me, but what a @#$)*(#$@()@*
work around:
part 1) Add a Valadation Control, and set it to validate the text of
text box. Set the Textbox to a value of "do not send" and set th
validator to require the value of the Textbox to be "send"... now jus
make the textbox invisible. That takes care of the Autopostback, s
your form will now never submit.. lol...
part 2) here's the really messed up part: for your code for you
treenode... do the following:
nodeLocations.ID = myVarContainingmyCurrentNodeID
nodeLocations.ID &= """ onclick=""treeClick()"
notice the Tripple quotes at the start of the 2nd line? That takes yo
out of the id and into the treenode. Lol then you throw in a onclic
and finish..
you end up with this on the client side:
<tvns:treenode ID="18
onclick="lblLocation.text=this.value;treeClick()">
Upstairs
</tvns:treenode>
Part 3) finally, add a javascript on your form to allow you to chec
what you want and post your form only when you want by setting you
validation field to correct and then submitting. By example, this i
how you would check that there is no children nodes in your selectio
and then submit the form based on that...
function treeClick()
{
var src=window.event.srcElement;
var isFinalNode = src.innerHTML.indexOf('tvns:treenode');
if (isFinalNode==-1){
lblLoginFailures.innerText = 'Final Node';
myvalidationbox.text = "send"
document.forms[0].submit();
}else{
lblLoginFailures.innerText = 'Has Children';
}
-
kevinscheid
-----------------------------------------------------------------------
Posted via
http://www.mcse.m -----------------------------------------------------------------------
View this thread:
http://www.mcse.ms/message778801.htm