unintelligible
08-05-2005, 07:22 PM
Hello,
I am using the wonderful Switch Content script here from DD for my company intranet. I'm essentially expanding and collapsing tables with text boxes in them. What I have been trying to do is to send a focus() call to the text box within the <div> tag that I am expanding to automatically set the focus to that box. This is how I am doing it:
<table onClick="expandcontent(this, 'sc1'); document.myForm.myTextBox.focus();">
This works just fine when the header is expanded, but once it becomes collapsed/invisible, the element is no longer detectable through JS on the page, so it throws a script error.
Does anyone know where I might be able to add my focus call (even if it's just a matter of detecting which scX was clicked and focusing the appropriate text box through an if/elseif or whatever) in the DD code?
Thanks!
[unintelligible]
I am using the wonderful Switch Content script here from DD for my company intranet. I'm essentially expanding and collapsing tables with text boxes in them. What I have been trying to do is to send a focus() call to the text box within the <div> tag that I am expanding to automatically set the focus to that box. This is how I am doing it:
<table onClick="expandcontent(this, 'sc1'); document.myForm.myTextBox.focus();">
This works just fine when the header is expanded, but once it becomes collapsed/invisible, the element is no longer detectable through JS on the page, so it throws a script error.
Does anyone know where I might be able to add my focus call (even if it's just a matter of detecting which scX was clicked and focusing the appropriate text box through an if/elseif or whatever) in the DD code?
Thanks!
[unintelligible]