Wee Bubba
09-01-2005, 06:01 AM
first of all, thanks to whoever supplied this free script. it has saved me a lot of time and effort!
i am having a small problem with it and wonder if somebody might help me.
i am designing an ASP.NET page and I have put a dropdownlist inside one of the dynamic layers. when my DropDownList posts back i am trying to set the focus back to it by doing this:
document.getElementById('myDropDownList').focus();
i notice that if I remove the 'Switch Content Script' then my DropDownList focuses ok after a post back. otherwise I get the error message saying it can't set focus on my control because its not there.
i presume this is something to do with the chain of events i.e. my focus script is trying to set focus to a control which has not yet been revealed by the Show/Hide script. however i have tried placing my focus script right at the end of the page and it still wont work.
can anyone help me?
i am having a small problem with it and wonder if somebody might help me.
i am designing an ASP.NET page and I have put a dropdownlist inside one of the dynamic layers. when my DropDownList posts back i am trying to set the focus back to it by doing this:
document.getElementById('myDropDownList').focus();
i notice that if I remove the 'Switch Content Script' then my DropDownList focuses ok after a post back. otherwise I get the error message saying it can't set focus on my control because its not there.
i presume this is something to do with the chain of events i.e. my focus script is trying to set focus to a control which has not yet been revealed by the Show/Hide script. however i have tried placing my focus script right at the end of the page and it still wont work.
can anyone help me?