Hi all,
i have this problem with my js+applet. the problem is simple, but in my logic i can’t find the solution.
ok here is my code
[COLOR=”DarkSlateBlue”][COLOR=”DeepSkyBlue”][COLOR=”DeepSkyBlue”]<html>
<head>
<title>RfidAppletTest03</title>
</head>
<body>
<h1>RfidAppletTest03</h1>
<SCRIPT>
var SEND_BUTTON_PRESSED = 1;
var CONNECT_BUTTON_PRESSED = 2;
var DISCONNECT_BUTTON_PRESSED = 3;
var EXIT_BUTTON_PRESSED = 4;
function doAlert(s) {
alert(s);
alert(document.getElementById ? document.getElementById(“testOut”).textContent : document.all(“testOut”).innerText);
}
function setTagID(tagList) {
if (document.getElementById()){
document.getElementById(“testOut”).textContent = tagList;
}else {
document.all(“testOut”).innerText = tagList;
}
}
function startAppletFunction (funcID) {
//alert (“startAppletFunction [“+funcID+”]”);
if (navigator.javaEnabled()){
if (funcID == CONNECT_BUTTON_PRESSED) {
// IP , PORT
document.rfidApplet.initConnection (“localhost”,”8205″)
}
document.rfidApplet.startAppletFunction(funcID);
}else {
alert(“Sie haben JavaScript nicht aktiviert !”);
}
}
</SCRIPT>
<applet
archive=”rfidApplet.jar”
code=”ms_java.RfidApplet02″
name=”rfidApplet”
width=100
height=100
mayscript =””
>
</applet>
<div id=”testOut”>
Dies ist ein text<br />
</div>
<input type=”button” value=”Connect”
name=”connectButton” onclick=”startAppletFunction(CONNECT_BUTTON_PRESSED)”>
<input type=”button” value=”Send”
name=”sendButton” onclick=”startAppletFunction(SEND_BUTTON_PRESSED)”>
<input type=”button” value=”Disconnect”
name=”connectButton” onclick=”startAppletFunction(DISCONNECT_BUTTON_PRESSED)”>
<input type=”button” value=”Exit”
name=”connectButton” onclick=”startAppletFunction(EXIT_BUTTON_PRESSED)”>
[/COLOR]
</body>
</html>[/COLOR]
[/COLOR]
basically i have an RFID antenne, and RFID reader. With this js code+applet, i can connect and start the reader to read the RFID-Tags and give the result.
as you can see with the four buttons, i can tell the reader what todo. and i will receieve the result of my action (scanning tags) or response from reader(applet+js sciprt) in [B]this
But now, i like to make the Connect and Send Button at my Login Page —>start the applet , and then after succesfull Login, redirect to [B]another
i’m not sure if, js can be “redirect”. my little experience says, that js-code only works on the page, which call the js
thank you very much for the help[COLOR=”DarkSlateBlue”]