Bug: SeaMonkey doesn't support function "contains"

SeaMonkey doesn't support Javascript function "contains", see 
http://de.selfhtml.org/javascript/objekte/anzeige/all_contains.htm and 
try "Test". How can I circumvent this problem as fast as possible?

O. Wyss
0
Otto
4/21/2007 7:12:19 AM
mozilla.dev.apps.seamonkey 1536 articles. 1 followers. Post Follow

6 Replies
512 Views

Similar Articles

[PageSpeed] 57

Otto Wyss wrote:

> SeaMonkey doesn't support Javascript function "contains", see 
> http://de.selfhtml.org/javascript/objekte/anzeige/all_contains.htm and 
> try "Test". How can I circumvent this problem as fast as possible?

This appears to be an IE-specific property:
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/contains.asp

For a generic containment method you would have to start at the inner 
element and follow the parent chain until you reached the outer element 
or you ran out of elements.

function contains(outer, inner) {
    for (var parent = inner.parent; parent; parent = parent.parent)
       if (parent == outer)
          return true;
    return false;
}

-- 
Warning: May contain traces of nuts.
0
Neil
4/21/2007 12:44:27 PM
Neil wrote:
> Otto Wyss wrote:
> 
>> SeaMonkey doesn't support Javascript function "contains", see 
>> http://de.selfhtml.org/javascript/objekte/anzeige/all_contains.htm and 
>> try "Test". How can I circumvent this problem as fast as possible?
> 
> This appears to be an IE-specific property:
> http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/contains.asp
> 
Does this mean "contains" isn't a "standard" Javascript function? IMO a 
rather important function.

I've already reworked my code not using contains. Thanks anyway.

O. Wyss
0
Otto
4/21/2007 2:21:32 PM
Otto Wyss schrieb:
> Neil wrote:
>> Otto Wyss wrote:
>>
>>> SeaMonkey doesn't support Javascript function "contains", see 
>>> http://de.selfhtml.org/javascript/objekte/anzeige/all_contains.htm 
>>> and try "Test". How can I circumvent this problem as fast as possible?
>>
>> This appears to be an IE-specific property:
>> http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/contains.asp 
>>
> Does this mean "contains" isn't a "standard" Javascript function?

Right. And http://de.selfhtml.org/javascript/objekte/all.htm#contains 
even states that it's specific to a few browsers (originally introduced 
by Microsoft with all their non-standard document.all stuff).

Robert Kaiser
0
Robert
4/21/2007 2:40:39 PM
Robert Kaiser wrote:
> Otto Wyss schrieb:
>> Does this mean "contains" isn't a "standard" Javascript function?
> 
> Right. And http://de.selfhtml.org/javascript/objekte/all.htm#contains 
> even states that it's specific to a few browsers (originally introduced 
> by Microsoft with all their non-standard document.all stuff).
> 
Well the comment in SelfHTML is only about Safari and in a manner it 
seems Safari specific. I usually don't use browser specific elements yet 
I can't take care of each browser in each situation.

O. Wyss
0
Otto
4/21/2007 2:50:22 PM
Otto Wyss schrieb:
> Robert Kaiser wrote:
>> Otto Wyss schrieb:
>>> Does this mean "contains" isn't a "standard" Javascript function?
>>
>> Right. And http://de.selfhtml.org/javascript/objekte/all.htm#contains 
>> even states that it's specific to a few browsers (originally 
>> introduced by Microsoft with all their non-standard document.all stuff).
>>
> Well the comment in SelfHTML is only about Safari and in a manner it 
> seems Safari specific. I usually don't use browser specific elements yet 
> I can't take care of each browser in each situation.

The comment, yes. The icons that show compatibility next to the header 
line show you nothing about any Gecko-based browser or JS/DOM standard 
though, that's what I meant.

Robert Kaiser
0
Robert
4/21/2007 3:27:12 PM
On Sat, 21 Apr 2007 09:12:19 +0200, Otto Wyss wrote:

> SeaMonkey doesn't support Javascript function "contains", see 

Yes it does. See:
<http://developer.mozilla.org/en/docs/XPath:Functions:contains>

> http://de.selfhtml.org/javascript/objekte/anzeige/all_contains.htm and 
> try "Test". How can I circumvent this problem as fast as possible?

The bug is in your code. Don't use "document.all" that's a non standard
MSIE construct. Instead use standard w3c methods. Also please read:
<http://developer.mozilla.org/en/docs/Transforming_XML_with_XSLT:For_Further_Reading>

Phil

-- 
Philip Chee <philip@aleytys.pc.my>, <philip.chee@gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.

0
Philip
4/21/2007 6:30:53 PM
Reply:

Similar Artilces:

can't get serverside dw functions to work: "Object doesn't support this property or method"
This is a multi-part message in MIME format. ------=_NextPart_000_00D7_01BF98D3.2B917E60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable When the user hits update, I want to display a blank row. To do that I = have this code in my page: if (dwMine_action + "" !=3D "undefined")=20 {=20 retVal =3D dwMine.SetAction (dwMine_action, dwMine_context);=20 Response.Write(dwMine_action); // for testing=20 if (dwMine_action =3D=3D "Update") {dwMine.InsertRow(0);}=20 } Response.Write( d...

superreview granted: [Bug 249593] [WinNT] Firefox won't start because of missing Function "CopyStgMedium" in urlmon.dll (or urlmon.dll doesn't exist at all) : [Attachment 153192] patch v1
Scott MacGregor <mscott@mozilla.org> has granted Scott MacGregor <mscott@mozilla.org>'s request for superreview: Bug 249593: [WinNT] Firefox won't start because of missing Function "CopyStgMedium" in urlmon.dll (or urlmon.dll doesn't exist at all) http://bugzilla.mozilla.org/show_bug.cgi?id=249593 Attachment 153192: patch v1 http://bugzilla.mozilla.org/attachment.cgi?id=153192&action=edit ------- Additional Comments from Scott MacGregor <mscott@mozilla.org> This patch hasn't regressed the ability to paste clipboard images in Thunderb...

superreview granted: [Bug 49487] If Linux inst msg "dir doesn't exist" is closed by checkbox, install wizard won't advance past "Next" : [Attachment 144546] patch
Brian Ryner (IBM) <bryner@brianryner.com> has granted Andrew Schultz <ajschult@mindspring.com>'s request for superreview: Bug 49487: If Linux inst msg "dir doesn't exist" is closed by checkbox, install wizard won't advance past "Next" http://bugzilla.mozilla.org/show_bug.cgi?id=49487 Attachment 144546: patch http://bugzilla.mozilla.org/attachment.cgi?id=144546&action=edit ...

superreview requested: [Bug 49487] If Linux inst msg "dir doesn't exist" is closed by checkbox, install wizard won't advance past "Next" : [Attachment 144546] patch
Andrew Schultz <ajschult@mindspring.com> has asked Brian Ryner (IBM) <bryner@brianryner.com> for superreview: Bug 49487: If Linux inst msg "dir doesn't exist" is closed by checkbox, install wizard won't advance past "Next" http://bugzilla.mozilla.org/show_bug.cgi?id=49487 Attachment 144546: patch http://bugzilla.mozilla.org/attachment.cgi?id=144546&action=edit ------- Additional Comments from Andrew Schultz <ajschult@mindspring.com> note that with bug 240929 and bug 236294 fixed, only the ErrorHandler part here is relevant. ...

superreview granted: [Bug 49487] If Linux inst msg "dir doesn't exist" is closed by checkbox, install wizard won't advance past "Next" : [Attachment 147374] fix error dialog
Brian Ryner (IBM) <bryner@brianryner.com> has granted Andrew Schultz <ajschult@verizon.net>'s request for superreview: Bug 49487: If Linux inst msg "dir doesn't exist" is closed by checkbox, install wizard won't advance past "Next" http://bugzilla.mozilla.org/show_bug.cgi?id=49487 Attachment 147374: fix error dialog http://bugzilla.mozilla.org/attachment.cgi?id=147374&action=edit ...

superreview requested: [Bug 49487] If Linux inst msg "dir doesn't exist" is closed by checkbox, install wizard won't advance past "Next" : [Attachment 147374] fix error dialog
Andrew Schultz <ajschult@mindspring.com> has asked Brian Ryner (IBM) <bryner@brianryner.com> for superreview: Bug 49487: If Linux inst msg "dir doesn't exist" is closed by checkbox, install wizard won't advance past "Next" http://bugzilla.mozilla.org/show_bug.cgi?id=49487 Attachment 147374: fix error dialog http://bugzilla.mozilla.org/attachment.cgi?id=147374&action=edit ...

superreview requested: [Bug 122238] input type="image" doesn't send x/y (image doesn't exist; width and height not set) : [Attachment 139545] Same as jkeiser's patch, really...
Boris Zbarsky <bz-vacation@mit.edu> has asked Johnny Stenback <jst@mozilla.jstenback.com> for superreview: Bug 122238: input type="image" doesn't send x/y (image doesn't exist; width and height not set) http://bugzilla.mozilla.org/show_bug.cgi?id=122238 Attachment 139545: Same as jkeiser's patch, really... http://bugzilla.mozilla.org/attachment.cgi?id=139545&action=edit ...

superreview granted: [Bug 122238] input type="image" doesn't send x/y (image doesn't exist; width and height not set) : [Attachment 139545] Same as jkeiser's patch, really...
Johnny Stenback <jst@mozilla.jstenback.com> has granted Boris Zbarsky <bz-vacation@mit.edu>'s request for superreview: Bug 122238: input type="image" doesn't send x/y (image doesn't exist; width and height not set) http://bugzilla.mozilla.org/show_bug.cgi?id=122238 Attachment 139545: Same as jkeiser's patch, really... http://bugzilla.mozilla.org/attachment.cgi?id=139545&action=edit ------- Additional Comments from Johnny Stenback <jst@mozilla.jstenback.com> + if (!name.IsEmpty()) { + aFormSubmission->AddNameValuePair(thi...

superreview requested: [Bug 131106] Make 'default browser' shouldn't steal image file associations from image programs : [Attachment 139348] only take "default browser" types for Seamonkey/Firebird
Mike Connor <mconnor@myrealbox.com> has asked Ben Goodger (I don't read bugmail) <bugs@bengoodger.com> for superreview: Bug 131106: Make 'default browser' shouldn't steal image file associations from image programs http://bugzilla.mozilla.org/show_bug.cgi?id=131106 Attachment 139348: only take "default browser" types for Seamonkey/Firebird by default http://bugzilla.mozilla.org/attachment.cgi?id=139348&action=edit ------- Additional Comments from Mike Connor <mconnor@myrealbox.com> http://lxr.mozilla.org/mozilla/source/xpfe/componen...

superreview cancelled: [Bug 131106] Make 'default browser' shouldn't steal image file associations from image programs : [Attachment 139348] only take "default browser" types for Seamonkey/Firebird b
Mike Connor <mconnor@myrealbox.com> has cancelled Mike Connor <mconnor@myrealbox.com>'s request for superreview: Bug 131106: Make 'default browser' shouldn't steal image file associations from image programs http://bugzilla.mozilla.org/show_bug.cgi?id=131106 Attachment 139348: only take "default browser" types for Seamonkey/Firebird by default http://bugzilla.mozilla.org/attachment.cgi?id=139348&action=edit ------- Additional Comments from Mike Connor <mconnor@myrealbox.com> forked for Firefox, if someone wants to take this and get r...

Doesn't bash shell support "locate" and "find" commands?
Hello everybody, probably I mistake, but it seems to me, the bash shell included in SLES 10 (accessible through Gnome Terminal Manager) doesn't support "locate" command at all, and I'm not satisfied of "find" command.... am I wrong? Paolo De Nictolis You need to install the package including locate, called findutils if memory serves. bd NSC Volunteer SysOp findutils-locate. Many thanks, Brad :) Paolo "Brad Doster" <bd@NSCSysOps.net> ha scritto nel messaggio news:VA.00003a90.534fa7f1@nscsysops.net... > Y...

superreview granted: [Bug 408248] When Seamonkey is launched from the command line with 'seamonkey.exe "? queryterm"', it throws an error message instead of launching the default search engine and sea
jag (Peter Annema) <jag@tty.nl> has granted neil@parkwaycc.co.uk <neil@httl.net>'s request for superreview: Bug 408248: When Seamonkey is launched from the command line with 'seamonkey.exe "? queryterm"', it throws an error message instead of launching the default search engine and searching for 'queryterm', the expected behaviour in Windows XP https://bugzilla.mozilla.org/show_bug.cgi?id=408248 Attachment 294981: Proposed patch https://bugzilla.mozilla.org/attachment.cgi?id=294981&action=edit ...

superreview requested: [Bug 408248] When Seamonkey is launched from the command line with 'seamonkey.exe "? queryterm"', it throws an error message instead of launching the default search engine and s
neil@parkwaycc.co.uk <neil@httl.net> has asked jag (Peter Annema) <jag@tty.nl> for superreview: Bug 408248: When Seamonkey is launched from the command line with 'seamonkey.exe "? queryterm"', it throws an error message instead of launching the default search engine and searching for 'queryterm', the expected behaviour in Windows XP https://bugzilla.mozilla.org/show_bug.cgi?id=408248 Attachment 294981: Proposed patch https://bugzilla.mozilla.org/attachment.cgi?id=294981&action=edit ------- Additional Comments from neil@parkwaycc.co.uk <...

"New message" doesn't always indicate (Seamonkey)
I'm using Seamonkey 1.1 on the Mac platform. It's frustrating that often (not always) when I receive new messages (the MacOS dock indicates that as well as the component bar of Seamonkey itself), none of the email accounts are displayed in bold as they should, indicating where to find that unread message, so I have to manually look through every single account's mailbox to see which mailbox or sub-folder may have that new message. What is the cause of this, and what can I do to fix it and prevent it from happening again? no-spam2@lycos.com wrote: > I'm using...

Web resources about - Bug: SeaMonkey doesn't support function "contains" - mozilla.dev.apps.seamonkey

Resources last updated: 1/14/2016 4:58:39 PM