Closed Bug 317910 Opened 20 years ago Closed 20 years ago

Venkman reporting wrong type for button object?

Categories

(Core :: DOM: Core & HTML, defect)

1.0 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 97829

People

(Reporter: jsd, Assigned: rginda)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921 Hi there. I'm using the venkman debugger with Moz 1.7.12 Venkman reports the following button objects in the watches window as type of 'submit' - whether declared inside or outside of a form container. I thought the type of a button object was supposed to be 'button' ? <button name="outsideform" id="outerbutton" onclick="validateForm()"</button> <form name="form1" onsubmit="return false"> <button name="insideform" onclick="validateForm()">Validate</button> ... ... </form> Is this a bug, or is the just how Mozilla sees button object types? Regards Keith roberts Reproducible: Always Steps to Reproduce: Expected Results: I was expecting the type of a button object to return 'button'
If it is a bug, it's got nothing to do with venkman. Maybe the DOM guys know.
Component: JavaScript Debugger → DOM
Product: Other Applications → Core
Version: unspecified → 1.0 Branch
See bug 97829 comment 11. *** This bug has been marked as a duplicate of 97829 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
I agree with comment 6, for bug 97829: quote ------- Comment #6 From Katsuhiko Momoi 2001-09-05 11:37 PST [reply] ------- ...snip... 'Buttons could be used for other purposes than submission. If non-submit type buttons always cause "submit" action, many forms will become unusable.' unquote. The following button declaration is valid outside of a form control, yet still returns the type of 'submit'. This button could be used to call a javascript function that has nothing to do with a form, or submitting a form - Eg some sort of DHTML page updating. <button name="outsideform" id="outerbutton" onclick="xmlPOST()"</button> Is there a valid workaround such as setting the type="button" attribute in the xhtml that is also Xbrowser compatible? The only thing I can think of at the moment is to declare a button like this: <button name="bt1" id="bt1" class="button" onclick="xmlPOST()"</button> Then check for the button class within the type="submit" control type. Not sure if this would be Xbrowser safe though! Regards - Keith Roberts
I don't understand your problem. <button type="button"> IS cross-browser compatible except for some really old browser that didn't knew the button element at all.
TY Erik. So I have to explicitly declare the type="button" attribute in the button declaration to force the type from 'submit' to 'button'? KR
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.