Advertisements

Evertjan. wrote:
> Otto Wyss wrote on 12 mrt 2007 in comp.lang.javascript:
>
>> to access the button in the onsubmit case
>
> var bnt = t.elements['logon']
>
>> and the onclick case?
>
> var bnt = t
>
And how do I find out if this element was clicked or not?
>
>> Is there a better tool than DomInspector (Mozilla) which is able to to
>> show a field in Javascript notation?
>
> What is "a field in Javascript notation"?
>
Any kind of element (button, input, select, etc) within any block
structure (form, table, div, etc).

Otto Wyss wrote on 12 mrt 2007 in comp.lang.javascript:
> Evertjan. wrote:
>> Otto Wyss wrote on 12 mrt 2007 in comp.lang.javascript:
>>
>>> to access the button in the onsubmit case
>>
>> var bnt = t.elements['logon']
>>
>>> and the onclick case?
>>
>> var bnt = t
>>
> And how do I find out if this element was clicked or not?

onclick = 'alert("This element is clicked: " + this.name)'
>
>>
>>> Is there a better tool than DomInspector (Mozilla) which is able to
>>> to show a field in Javascript notation?
>>
>> What is "a field in Javascript notation"?
>>
> Any kind of element (button, input, select, etc) within any block
> structure (form, table, div, etc).

How could that be javascript?
What do you want the DOM inspector for?
DOM is good to find a parent,
but children are not always cross browser ligitimate.

Oh, do you mean a Javascript usable element pointer?

var myElement = document.getElementById('myElementId');

or if you want to use the parent name and the element's name,
using specific collections:

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!