/    Sign up×
Community /Pin to ProfileBookmark

javascript+applet+to the next Page

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[/B] page. —>tag-id

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 [/B]page, and in this page i want to receive a response from the applet according to my action—-> scan the tags.

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”][/COLOR]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @schiggyblast spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...