From: nikola <web...@ya...> - 2005-03-02 08:48:09
|
hi, I have problem including external javascript file here is the code: String js_1 = "file://D:/FoxServ/www/app/javascript/main.js"; final String content = "<html><head><title>aaa</title>" +"<script language=\"JavaScript\" src=" + js_1 +" type=\"text/javascript\"></script>" ... when I load the page final HtmlPage page = loadPage(content); I get this error: 2005.03.02 09:43:16 com.gargoylesoftware.htmlunit.html.HtmlPage loadJavaScriptFromUrl WARNING: Expected content type of text/javascript or application/x-javascript for remotely loaded javascript element file://D:/FoxServ/www/app/javascript/main.js but got [text/html] 2005.03.02 09:43:16 com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter error SEVERE: error: message=[syntax error] sourceName=[file://D:/FoxServ/www/app/javascript/main.js] what am I doing wrong ? thanks ... __________________________________ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ |