Shouldn't your javascript be in the <head> rather than outside the HTML?
Hi,
I'm using Microsoft Tablet PC Platform SDK 1.7 and Win XP. I'd like to use an activex control within my webapp (Java Webapp, JSP, Tomcat).
Here is the code I put in my JavaServer Page:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<script language="JavaScript" type="text/javascript">
<!--
// helper function that extracts the blog data from the
// form and posts the result to the server
function addInk(form) {
// extract the blog's body data as ink and text
form.bodyText.value = inkTest.TextData;
form.bodyInkData.value = inkTest.InkData;
form.submit();
}
// helper function that releases resources held by the
// ink control
function onUnload() {
inkTest.DisposeResources();
}
//-->
</script>
<html>
<head>
<title>Signatur-Demo</title>
</head>
<body onunload="javascriptnUnload();">
<h1>Signatur-Demo</h1>
<object id="inkTest" classid="InkBlogControls.dll#InkBlog.InkArea"
width="400" height="296">
Sorry, your browser doesn't seem to support controls.
</object>
<br/>
<p>
<button id="addButton" type=button onclick="javascript:addInk(document.signForm);"> ;
Add Ink
</button>
</p>
<form name="signForm" action="<%= request.getContextPath() %>/Controller" method=post>
<input type="hidden" name="bodyText" id="bodyText">
<input type="hidden" name="bodyInkData" id="bodyInkData">
</form>
</body>
</html>
When running the example in IE 6.0 the page is displayed - but the activex control doesn't seem to work.
Can anyone give me a hint or solution on how to use an activex control (ink) within my java web application (JSP)?
Best regards,
- Stephan
Shouldn't your javascript be in the <head> rather than outside the HTML?
Thank for your reply.
No, I don't think this is the point - it seems the dll isn't loaded correctly.
I tried to test some samples but none of them works - here a very simple one:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<html>
<script language="jscript">
// Release any resouces held by the AutoClaims control
function OnUnload()
{
autoClaimsControl.DisposeResources();
}
</script>
<head>
<title>AutoClaims (Web Control)</title>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
</head>
<body onunload="OnUnload()">
<object id="autoClaimsControl" classid="http://localhost:8084/SignatureDemo/AutoClaims.dll#AutoClaims.AutoClaims" VIEWASTEXT>
Sorry, your browser doesn't seem to support controls.
</object>
</body>
</html>
I put the code in my JSP, the AutoClaims.dll in the root dir of my project and deployed my web app - on http://localhost:8084/SignatureDemo only a small square appears (but not the actual activex control)...
What am I doing wrong? Do I have to change some security settings? Or do I have to put the dll to some other place?
Any help would be greatly appreciated
- Stephan
Bookmarks