How can I use an class to access it from by web page?
the format() class is an external classCode:<INPUT value='0' type="text" onBlur="format(txtbox.value);" name="txtbox">
Thanks
Printable View
How can I use an class to access it from by web page?
the format() class is an external classCode:<INPUT value='0' type="text" onBlur="format(txtbox.value);" name="txtbox">
Thanks
Is format a class or a function?
Where StringManip contains the format function.Code:<script src="../MyFunctions/StringManip.js"></script>
format() is an external function
I have a web page where I have this tag:
Now I have a file called: format.javaCode:<INPUT value='0' type="text" onBlur="format(txtbox.value);" name="txtbox">
This file has a function:
VB Code:
public class formata(msg){ ...; ...; }
How can i link the two parts?
Thanks!
Do you mean a Java class file? If so, and you have already added the applet to your html file, i.e.:
Then recode your call as:Code:<APPLET NAME="myapplet"
CODE="myJavaClass.class"
HEIGHT="250" WIDTH="600">
</APPLET>
Code:<INPUT value='0' type="text" onBlur="myapplet.format(txtbox.value);" name="txtbox">
No.. it's no an applet. What I have in the .html file is this:
And, in another file I have this:Code:<HTML>
<BODY>
<TEXTAREA name="textarea" rows=12 cols='15' style="TEXT-ALIGN: right"></TEXTAREA>
<BR>
<INPUT value='0' type="text" onBlur="format(txtbox.value);" name="txtbox">
</BODY>
</HTML>
Code:public class formata(msg){
...;
...;
}
Java != Javascript
Are you using Java or Javascript if it's the latter..
change the format.java to format.js
with formata drop the public class bit for function formata(msg){...}
<script src="format.js">