On Oct 7, 10:25 am, dojademake <[email protected]> wrote:
> On Oct 7, 12:12 pm, johnjbarton <[email protected]> wrote:
>
> > You're not giving the Firefox/Firebug version or an example we can
> > try.
>
> Firefox version 3.5.3 Firebug version 1.4.3
>
> As for an example, I cannot get it to work on any page.
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title></title>
> <script type="text/javascript">
> function testDivContents(divToTest) {
> alert(divToTest.innerText);
> }
> </script>
> </head>
> <body>
> <div id="nameOfMyElementId" onclick="testDivContents(this);"></
> div>
> </body>
> </html>
>
> What I am trying to determine is if the div is empty. In IE (I know
1) Command line dir($('nameOfMyElementId');
2) HTML panel, search nameOfMyElementId, click DOM side panel (or
just look at the element, its empty)
> that is the worst browser ever), I am able to use a conditional
> statement against the innerText property. In Firefox, the alert
> states that innerText is undefined. I haven't been developing against
> standards long enough to know which property I should be using so I
> thought I could use Firebug to list the valid properties with the dir
> command.
>
> The root of the problem however is not solving the test for an empty
> div (though I will take advice). The real issue is why can't I get
> the dir command to work in Firebug javascript debugging?
Because you did not give it an element I guess.
jjb
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/firebug?hl=en
-~----------~----~----~----~------~----~------~--~---