Subj : AutoConfigProxy -> JSEng To : netscape.public.mozilla.jseng From : Corail131 Date : Wed Mar 31 2004 04:34 pm Hello, I have a C program that must get an auto config proxy file on internet, execute it and get the proxy list. I used JS (SpiderMonkey) to emulate javascript into my C program. ----------------------------------- this is the script : function FindProxyForURL(url,host) { if (url == "http://www.OK.com") return "PROXY proxy1:8080;PROXY proxy2:8080;DIRECT"; if (localHostOrDomainIs(host, "www.OK.fr")) return "PROXY proxy3:3128"; return "PROXY proxy0:8080"; } ----------------------------------- I call the function FindProxyForUrl with using function JS_CallFunctionName. When i execute the script into my C program, the first IF run successfull. But the second always failed. 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 ??? Please help !!! Corail131 .