FireFox bug?

Posted: June 22, 2005 in Computing, General

I found an interesting bug when attempting to add elements to a selection element. The function allows for an optional second argument which defines which element you want to insert before (if you leave it out, the element will be placed at the end of the select list). FireFox kindly throws an exception in this case though:

Error: uncaught exception: [Exception... "Not enough arguments [nsIDOMHTMLSelectElement.add]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: https://localhost/index.html :: setJobMenu :: line 178" data: no]

The solution is to simply add “null” as the second argument.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s