Greetings all. If only I was a little braver I would just shoot myself and end my misery but since I am not - please shoot me!!! I mean HELP me :)
Picture a named form with contents defined as follows:
[HTML]
<form name="myform">
<div id="extrawhatev er" style="visibili ty: 'hidden'> <!-- div and select do share -->
<select name="extrawhat ever"> <!-- common name/id value -->
<!-- options will be filled in dynamically later -->
</select>
</div>
<input type="text" name="whatever" id="whatever" onfocus="prepmy List();">
...
</form>
[/HTML]
As I understand things, if an form element has focus its container (form) MUST exist in the memory space right??? If I can use getElementById( 'whatever') on one line of code it should also work on the next line? So now the focus handler contains:
Note that IE6 and 7 run this just fine. Firefox is the complainer. I am trying to use Firebug to debug another area of my code that is after this point.
This is driving me on the short trip to CRAZY. Anybody got a grip on it? Any ideas will be greatly appreciated.
Impeach the whole government!
Dan Ellison
Picture a named form with contents defined as follows:
[HTML]
<form name="myform">
<div id="extrawhatev er" style="visibili ty: 'hidden'> <!-- div and select do share -->
<select name="extrawhat ever"> <!-- common name/id value -->
<!-- options will be filled in dynamically later -->
</select>
</div>
<input type="text" name="whatever" id="whatever" onfocus="prepmy List();">
...
</form>
[/HTML]
As I understand things, if an form element has focus its container (form) MUST exist in the memory space right??? If I can use getElementById( 'whatever') on one line of code it should also work on the next line? So now the focus handler contains:
Code:
function prepmyList(arg) { var x = new getObj('extra'+arg); // ref hidden div from above by id so I can // make it visible after it is populated ... } function getObj(arg) { this.obj = document.getElementById(arg); // THIS WORKS FINE!!!! this.style = document.getElementById(arg).style; // ERROR NO PROPERTIES .... }
This is driving me on the short trip to CRAZY. Anybody got a grip on it? Any ideas will be greatly appreciated.
Impeach the whole government!
Dan Ellison
Comment