Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP! Cant get my java .class onto my .htm

Status
Not open for further replies.

MichaelBartolotta

Programmer
Jan 14, 2004
7
US
I can't seem to add my custom java object to a webpage. It should be rather simple, but it aint workin! The .class and the .htm are in the same directory.I tried ...
- classid="java:Dancer.class"
- codepage="all kinds of combinations"

All I get is "text incase it cant load"

===========
<html>
<head></head>
<script language=vbScript>
window.alert MyDancer.getLogonId()
</script>
<body>
<object id=&quot;MyDancer&quot; classid=&quot;java:Dancer&quot; codetype=&quot;application/java&quot;>
text incase it cant load
</object>
</body>
</html>
============
the Dancer.java compiles fine with the following relavant code....

private int logonId;
public int getLogonId() {
return logonId;
}
 
have you tried

<object id=&quot;MyDancer&quot; classid=&quot;Dancer&quot; codetype=&quot;application/java&quot;>
text incase it cant load
</object>


furthermore, vbscript has msgbox(), not alert()
<script language=vbScript>
msgbox MyDancer.getLogonId()
</script>

or

<script type=&quot;text/javascript&quot;>
alert(MyDancer.getLogonId());
</script>

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top