Subj : Re: AutoConfigProxy -> JSEng To : netscape.public.mozilla.jseng From : "Corail" Date : Thu Apr 01 2004 09:08 am Hi, this is the code : /* Define a bunch of native functions first: */ static JSBool mylocalHostOrDomainIs(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { JSBool bret = JS_FALSE; if (argc != 2) return bret; char *host=NULL, *hostdom=NULL; host = JS_GetStringBytes(JSVAL_TO_STRING(argv[0])); hostdom = JS_GetStringBytes(JSVAL_TO_STRING(argv[1])); if (_tcschr(host, '.') == NULL) bret = JS_TRUE; if ( _tcsnicmp(host, hostdom, _tcslen(host)) == 0) bret = JS_TRUE; return bret; } Corail131 "Brendan Eich" wrote in message news:406B9E88.7040602@meer.net... > Corail131 wrote: > > > I have add a function into my JSObject object named > > mylocalHostOrDomainIs that is bind to ths javascript function > > localHostOrDomainIs. > > > > Why the second IF doesn't run ??? > > Show your code for mylocalHostOrDomainIs and perhaps someone can help. > Not showing code that anyone trying to diagnose the problem would need > to read is not helpful. > > /be > .