I am having trouble using ECS to use a JavaScript library file. I've read
the earlier append but it did not help me. I am using Visual Cafe 4.5 and
WebLogic 6.0. I've placed the genutil.js file in what I believe is the
appropriate directory. (it loads ok, if I change the name of the file it
can't find the file and won't load) I've been able to imbed JavaScript
from the servlet but not from the libary file. I tried adding another
.addElement after the setSrc. It put text in the area I expected the
JScript but not the contents of the library. What am I doing wrong?
I placed genutil.js in c:
\WebGain\bea\wlserver6.0spq\config\mydomain\applications\DefaultWebApp_myserver
and called it using ECS by,
Html mainPage = new Html()
.addElement(new Head()
.addElement(new Title("Entry Form"))
.addElement( new Script()
.setLanguage("JavaScript")
.setSrc("/genutil.js"))
.addElement(new Script() // this section works fine
.setLanguage("JavaScript")
.addElement("function checkNum(input){ " +
" if ( ! isNaN(input.value) ) { " +
" return; }" +
" else { " +
" window.alert('Non-numeric input!'); " +
" gotoItem(input); } }" )))
It compiled ok and did not state that it couldn't find genutil.js when
loaded into the browser (Netscape)... but the source looked like this. How
do I get my library file be included between the <!- //-> ?
<html><head><title>Entry Form</title><script src="/genutil.js" language
="JavaScript">
<!--
// -->
</script><script language="JavaScript">
<!--
function checkNum(input){ if ( ! isNaN(input.value) ) { return; }
else { window.alert('Non-numeric input!'); gotoItem(input); } }
// -->
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]