Problem of Java - javascript and javascript - java communicate of same obje

Hi all,
I have met a great problem in program an applet! I have tried to communicate between java and javascript and javascript and java in the same page by using jsobject. However, problem occur. It is not a problem to call javascript from java by using jsobject. However, javascript call java by using document.object.function has problem. It cannot find out the object in IE. I have followed the webpage show in java, but the browser still prompt me the object called client not find. Please help!! My html code is shown as follow:
<HTML>
<HEAD>
<TITLE>Alva Final Year Project Demo</TITLE>
</HEAD>
<Script language="javaScript">
function show(html){
layer.innerHTML = html;
function getResponse(response){
alert("response: " + response);
document.client.getJSCommunicate();
</Script>
<BODY>
<DIV id="layer" style="position:absolute">
<H2>Secure Server</H2>
<HR>
<!--"CONVERTED_APPLET"-->
<!-- CONVERTER VERSION 1.0 -->
<OBJECT id="client" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = "800" HEIGHT = "400" codebase="http://java.sun.com/products/plugin/1.1.1/jinstall-111-win32.cab#Version=1,1,1,0">
<PARAM NAME = CODE VALUE = "ClientPart.class" >
<PARAM NAME="SCRIPTABLE" VALUE="true">
<PARAM NAME="MAYSCRIPT" VALUE="true">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.1">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.1" java_CODE = "ClientPart.class" NAME = "client" WIDTH = "800" HEIGHT = "400" pluginspage="http://java.sun.com/products/plugin/1.1.1/plugin-install.html"><NOEMBED></COMMENT>
</NOEMBED></EMBED>
</OBJECT>
<!--
<APPLET CODE = "ClientPart.class" WIDTH = "800" HEIGHT = "400" NAME = "clientPart" >
</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->
</DIV>
</BODY>
</HTML>
Thanks your kindly help.
Alva

Everthing looks fine to me from here, you should be able to just call the java function direct such as
document.myAppletObj.doMethod();
I think your problem could be that your object is called "client". IE can get funny about names, it didn't like me calling a method delete()!!
Try adding something else to the name such as "my_client", and see if this works any better.
Chris

Similar Messages

  • Problem connecting Firewire device and external HD at the same time

    Hi. I'm attempting to record digital audio through a Presonus Firepod A/D interface via a Firewire 400 to 800 cable connected to one of the Firewire 800 ports on a mid-2010 Mac Pro running Snow Leopard.
    The problem is that if I have an external HD connected to one of the other Firewire 800 ports on the computer and powered on at the same time, the connection to the Presonus Firewire device is not recognized by the Mac Pro. Not only that, performance of the Mac Pro is affected adversely and System Profiler is unable to list any Firewire devices. If I turn the external HD off, the Presonus device is recognized and listed in System Profiler and the machine runs fine. I'm able to connect two external hard drives via separate Firewire 800 ports on the Mac Pro and both drives mount w/ no problem. It's only when I try to connect one of the external HDs and the Presonus audio device at the same time that the problem occurs.
    I used this same arrangement on a PowerMac G5 running Tiger w/ no problems whatsoever. If the 400 to 800 cable is bad, I would think it wouldn't work at all, but it does when only the Presonus Firepod is connected and powered on. Any ideas?

    Have done more research and apparently this is not an uncommon problem: overloading the Firewire bus when connecting an audio device along with an additional device like an external hard drive. As I understand it now, audio signal is a bandwidth hog and the solution is to get a Firewire PCIe card which will have its own independent Firewire bus and which I'll use exclusively for my audio device.

  • Problem Installing Oracle 8i and Oracle 10g client on same machine

    Hi Gurus,,
    I am new on DBAside....
    I have already installed Oracle 10g R2.m planning to install oracle 8i on same machine..
    What steps should i follow in order to avoid conflict..
    The OS is Windows XP SP3....
    I know that installing oracle 8i first and than installing oracle 10g is more convinient..But my requirements are different..
    so have to install oracle 10g first and then Oracle 8i on same machine..
    Thanks in anticipation.

    Hold on - it DOES matter - you shouldn't update new repository with old oracle installer, so be careful...
    Paul

  • Problems with Sent mail and multiple accounts on the same server

    I have 2 different email accounts that are on the same server. Regardless of the account from which I send the email, all of the sent messages end up in the same sent folder. Is there a way to force the sent messages to go into their correct Sent folder?

    In the Finder, go to ~/Library/Mail/. With that folder open, do Edit > Select All (⌘A), then Edit > Copy (⌘C), and paste it in your reply to this post, to let me see the names of the files and folders present at the root level of the Mail folder.
    Before actually posting that information, you may edit it so that the file/folder names do not reveal any details you wish to keep private, e.g. you may replace any real username with "username" to hide your real email address if you wish; similarly, you may disguise any domain names you don't want to be revealed. Try to be consistent in how you disguise those details, though, as we may need to refer to them in subsequent posts.
    Now, go to ~/Library/Mail/Mailboxes/. With that folder open, repeat the process to let me see the names of the files and folders it contains. Again, you may disguise any mailbox names you wish to keep private. Be careful to not alter any suffixes, though.
    Finally, for the two accounts involved in the problem, locate the account folders within ~/Library/Mail/ -- their name begins with the account type (POP, IMAP, Mac), followed by the account username and the incoming mail server. For each account folder, repeat the process to let me see the names of the files and folders it contains.
    Note: For those not familiarized with the ~/ notation, it refers to the user's home folder. You can easily locate any of the folders referred to in this post by copying the file path here, doing Go > Go to Folder in the Finder, and pasting the file path there.

  • Problems with magic mouse and wireless keyboard at the same time

    I have a Macbook pro 15" mid 2009, with lion 10.7.3, i bought a magic mouse and small wireless keyboard Apple, but when i'm working with both devices at the same time, the magic mouse begin to do something wrong, the left click work as left click, and  i have to turn off the keyboard, wait for a while and then the mouse work good, the keyboard work good alone and mouse too, but at the same time no.
    What do you think about rarely issue?
    Thanks.

    Hello:
    Try trashing a preference file (com.apple.bluetooth.plist) and restarting.
    Barry

  • Synchronous and asynchronous IO on the same file descriptor

    Hi does any body knows about problems in combining synchronous and asynchronous IO on the same file descriptor? It appears that I may miss SIGIOs in that case.

    I don't think there is any real easy way to do an insert. If writing to a file, I would use a FileWriter, a FileOutputStream, or a RandomAccessFile class. I don't know of any class that will automatically do an insert so you might have to write your own method that does this. This is pretty easy: use RandomAccessFile might be the best for most situations for doing this (ie, if you are inserting many times at different locations in the file). Just copy all the bytes from the point in the file you want to insert to the end of the file, and then write your bit, and then rewrite all the read bytes to the file again. Depending on how many times you are writing to the file and how big the file is, you may want to keep the file in memory at all times because writing to disk is extremely slowwww. If the file is huge, and you are inserting seldomly, then do what I said above. If the point of insertion is closer to the start of the file, then it might be a good idea to do the above but instead of copying the bytes from the point of insertion to the end of the file, copy the bytes from the start of the file to the point of insertion.

  • Problem with Java and Windows (Mainly Vista and UAC)

    Hi all,
    I am having a problem with a program that I've devoloped. The program itself is packaged as a jar and I plan to deploy it across multiple platforms eventually however right now i am only concerned about windows based systems. I have made an installer for a windows baised systems using NSIS to install the software files. I made the installer as I need several java packages to be installed so the program would work (JAI, J3D, JAI ImageIO) and I also require the program to have fileassociations on windows.
    I know that this is not what java is about, however the majority of the users will be on windows baised systems so I've decided that OS specific installers is the best option.
    During the process I have noticed that there are several key problem with java for this type of application!
    The first issue that I have come across is getting file associations to work on java. As a .jar is not an excutable it is not possible to directly associate a filetype with it in java so to overcome this I currently run the program from a .bat files and also the program requires large memory so this also allows me to run the program with -xmx. The batch file that I use is :
    <code>
    cd PATH TO PROGRAM
    start javaw -Dsun.java2d.noddraw=true -Xmn100M -Xms500M -Xmx1000M -jar "PATH TO PROGRAM\program.jar" %1 -vram 134217728
    pause;
    </code>
    Ok so all this appears to work fine and allows windows to have file associations and start the program and thats all works perfectly but this is a non-ideal solution. Has anyone got any advice on improving this?
    The next problem that I have appears to be a problem with Vista and UAC (user access control). When a user installs the program and installs the program into the program files directory I found that the program did not work and kept saying that I did not have access to the files in the current directory. This is a problem as I read and write settings files during program execution.
    On a Vista system UAC prevents file write operations into the Program Files directory unless the program has requested elevated status even if the user is a full administrator. The probem is that there appears to be no real way to achieve this under java that I'm aware of...
    Has anyone else had this probem and has a suitable solution?
    Any advice on these issues would realy be appricated.
    Regards
    Joey

    Ok so i've kinda found a solution, its not ideal but its very good. I found this program called Elevate
    A link to the site I got it was
    http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/03/27/elevate-a-process-at-the-command-line-in-vista.aspx
    This program allows you start java with a UAC dialog for high access using
    Elevate java -jar myjar.jar
    This then allows you to have full access using java... I guess it could be dangerous but it does the job.

  • Problem with java and pogo games

    i use mozilla and now with the problems with java and hackers cannot play my pogo games,what can i do? i disabled my java i tried java 6 doesnt work or is not safe,what is a safe way to play games on pogo that use java?

    Oracle has released a Java 7 Update 11 to address security vulnerabilities and you should update to that version.
    *https://support.mozilla.org/kb/how-to-use-java-if-its-been-blocked
    See also:
    *http://kb.mozillazine.org/Java#Windows_installation_issues
    You can find the latest Java version on the Oracle website.
    See Java Platform > Java SE 7U11 and Java 6U38 (Download JRE)
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • Problem with java swing button and loop

    Problem with java swing button and loop
    I�m using VAJ 4.0. and I�m doing normal GUI application. I have next problem.
    I have in the same class two jswing buttons named start (ivjGStart) and stop (ivjGStop) and private static int field named Status where initial value is 0. This buttons should work something like this:
    When I click on start button it must do next:
    Start button must set disenabled and Stop button must set enabled and selected. Field status is set to 1, because this is a condition in next procedure in some loop. And then procedure named IzvajajNeprekinjeno() is invoked.
    And when I click on stop button it must do next:
    Start button must set enabled and selected and Stop button must set disenabled.
    Field status is set to 0.
    This works everything fine without loop �do .. while� inside the procedure IzvajajNeprekinjeno(). But when used this loop the start button all the time stay (like) pressed. And this means that a can�t stop my loop.
    There is java code, so you can get better picture:
    /** start button */
    public void gStart_ActionEvents() {
    try {
    ivjGStart.setEnabled(false);
    ivjGStop.setEnabled(true);
    ivjGStop.setSelected(true);
    getJTextPane1().setText("Program is running ...");
    Status = 1;
    } catch (Exception e) {}
    /** stop button */
    public void gStop_ActionEvents() {
    try {
    ivjGStart.setEnabled(true);
    ivjGStart.setSelected(true);
    ivjGStop.setEnabled(false);
    getJTextPane1().setText("Program is NOT running ...");
    Status = 0;
    } catch (Exception e) {
    /** procedure IzvajajNeprekinjeno() */
    public void IzvajajNeprekinjeno() {  //RunLoop
    try {
    int zamik = 2000; //delay
    do {
    Thread.sleep(zamik);
    PreberiDat(); //procedure
    } while (Status == 1);
    } catch (Exception e) {
    So, I'm asking what I have to do, that start button will not all the time stay pressed? Or some other aspect of solving this problem.
    Any help will be appreciated.
    Best regards,
    Tomi

    This is a multi thread problem. When you start the gui, it is running in one thread. Lets call that GUI_Thread so we know what we are talking about.
    Since java is task-based this will happen if you do like this:
    1. Button "Start" is pressed. Thread running: GUI_Thread
    2. Event gStart_ActionEvents() called. Thread running: GUI_Thread
    3. Method IzvajajNeprekinjeno() called. Thread running: GUI_Thread
    4. Sleep in method IzvajajNeprekinjeno() on thread GUI_Thread
    5. Call PreberiDat(). Thread running: GUI_Thread
    6. Check status. If == 1, go tho 4. Thread running: GUI_Thread.
    Since the method IzvajajNeprekinjeno() (what does that mean?) and the GUI is running in the same thread and the event that the Start button has thrown isn't done yet, the program will go on in the IzvajajNeprekinjeno() method forever and never let you press the Stop-button.
    What you have to do is do put either the GUI in a thread of its own or start a new thread that will do the task of the IzvajajNeprekinjeno() method.
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    This tutorial explains how to build a multi threaded gui.
    /Lime

  • Problem with Java 5 and Oracle 10g JDBC driver

    Hi All,
    Currently we upgrade our web application to Java 5 and Oracle 10.2 JDBC driver. And we encountered a bug, when the user entered the information through UI and data didn't store into database (Oracle 9i). The problem is that this bug is not happend so often maybe once a day and this did not happen before we upgraded to Java 5 and Oracle 10.2 JDBC driver. Does anyone encounter the same problem ? Is this Java 5 problem or Oracle JDBC driver problem ?
    Thanks,

    sounds like a database problem...
    Are you using a driver version that's supported for your database engine?
    What else did you change? We once ran into a major bug in our application that had for 5 years been masked by performance problems in our hardware and infrastructure.
    Once those were resolved the bug showed itself and caused tens of thousands of records to be erroneously inserted into our database every day.
    It's certainly NOT a problem with your JVM (if it's a decent one, like the Sun implementation).
    So it's either your database, your driver, your network (dropping packets???), or your application.
    The upgrade may just have exposed something that was already there.

  • Problem with java, ASCII and Linux

    Hi Friends,
    I has a Linux RedHat 9.0 with a jre1.5.0_04 (rpm package of Sun).
    I has a problem with ASCII , for example :
    import java.io.*;
    public class HolaMundo
    public static void main (String[] args)
    System.out.println("Hol� M�ndo");
    this programs runs ok on my windows jdk so it prints "Hol� M�ndo", but when i run the same HolaMundo.class program on my linux redhat it prints "Hol�� M��ndo"
    I think the problem is with the ASCII table that uses the linux version of jre, but i dont know how to solve this problem. I need a Spanish-European ASCII table on my application but i think it is working with a US-ASCII table.
    Then i has installed a kaffe 1.0 (rpm) java machie on this linux and this solve the problem but i has another problems of compatibility with this old version of java kaffe.
    Do you know whats happening?
    Thanks in advance.

    The problem doesn't have to do anything with Java or Linux as far as i can see. It's more likely a problem with Windows XP and IE. Be assured that normally downloading the Linux JDK in windows is not a problem.

  • I have a problem with Java and an e-procurement system integrating

    I use an e-procurement system at work and yesterday I could not get my parts list from the suppliers web site to display in our in-house eprocurment finance package.
    There is not a problem with the finance package. There is not a problem with the suppliers web site. I have verified both of these by other colleagues being able to complete what I am trying to do.
    The difference between my version of Firefox and my colleagues' is that I am on version 6.0.1 and they are on 6.0.
    I have had problems with Java not displaying certain animations on the suppliers web site but, my colleague does not and I am suspicious that this is the problem. Can anyone verify this please and what can I do about it. My Java updates are up-to-date as of yesterday and are automatic.
    Thanks.

    I was quite amazed I never got a reply to this, in the past people here have been helpful. In any case I was finally able to enter this website on the exceptions list in the Java panel, and I believe it is okay  now.

  • When firefox checking for updates and updates found but due to proxy restrictions it unable to download the updates then it continue trying to download that and this time it creating problem on running javascript

    When firefox checking for updates and updates found but due to proxy restrictions it unable to download the updates then it continue trying to download that and this time it creating problem on executing javascript and raising errors.

    What are the error messages you are seeing?

  • CP5: Problems with Execute Javascript and New/Current window setting

    Hello everyone,
    I am at my wits' end trying to set this up properly, and I was hoping for some help.
    I have inserted a series of buttons designed to open other captivate-created HTM files. I wanted the files to be opened in a controlled window, so I used Execute_Javascript function on the buttons. Here is the code I am using:
    void window.open('filename.htm','name','height=680,width=906,left=0,top=0');
    I enter that code in the script window. I also want to set it to open in a new window (not reuse the current window), so I used the arrow to the right of the Script_Window button and set it to "New."
    When I publish and put it all up on a SharePoint server, it works fine. But then I had to correct a typo on one of my slides (unrelated to this functionality), so I corrected it and republished. The buttons which were working moments before now no longer function. It seems that the "New" setting I had set in the drop-down had reverted to "Current" without me touching it. The Javascript also stopped working. Clicking the button sometimes launches the file in the current window, sometimes in a new window, and sometimes the launch itself fails.
    Captivate just seems to forget the New/Current setting all by itself. And for some reason, the actual launching of the file via Javascript also just stops working.
    As a test to fix the non-functioning Javascript, I deleted the word "void" then saved the CPTX. Then I added the word "void" back in, saved it again, and published, and now it works. I can't make heads or tails of this, and it is very frustrating, especially since it will delay the delivery of my files.The javascript reads the exact same and yet sometimes it works and sometimes it doesn't.
    Has anybody seen this before? How on earth do I fix it?
    Thanks!

    Hi Jim,
    Thanks for the feedback. It's good to know that the New/Current issue is a bug and it's not just me.
    I tried your suggestion, and I am still having the same problem. I also tried switching to Open File or URL and entering this:
    javascript:void window.open('filename.htm','name','height=680,width=906,left=0,top=0' );
    Same problem. Sometimes it works and sometimes it doesn't. Code is exactly the same. I can literally put the code in and publish, it works fine, then I can go back into the project, change something completely unrelated (i.e., not touch the javascript), publish again, and now it doesn't work.
    Thanks for any additional feedback.

  • Discussion Forum Portlet - Problems with JAVA and UTF8?

    Hi
    I installed the Discussion Forum Portlet successfully. It also seems that almost everything works fine. There's only a problem if I have new posts that include special German characters (Umlaute) like ä, ö, ü or special French characters like é, è or ç. They are saved correctly in the table but if you view the post the characters are not displayed correctly.
    Example
    input: ça va?
    result: ça va?
    I know that there are problems with Java and UTF8 Database. Is there a possibility to change this (bug)?
    Regards
    Mark

    Here's what I got. I don't see anything that helps but I'm kinda new to using SQL and java together.
    D:\javatemp\viddb>java videodb
    Problem with SQL java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver
    ] Syntax error in CREATE TABLE statement.
    Driver Error Number-3551
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in
    CREATE TABLE statement.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Unknown Source)
    at videodb.main(videodb.java:31)
    D:\javatemp\viddb>

Maybe you are looking for

  • Problem with binding in h:dataTable

    Hi I have a problem with h:dataTable, where the table rows are bound to objects (Bean$Line) nested within a backing bean (Bean). JSP: <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@taglib prefix="f" uri="http://java.sun.com/jsf/c

  • Empty Report Layout in Dashboard instead of NO RESULTS

    Hi I am using OBIEE 11.1.1.5 I have created some reports When I give some filter conditions I expect it to display No results But What I am getting is an Empty Report Layout with the Column Headings and Grand Total without any values in the cell Have

  • Download Master Collection CS5.5

    Please help I need to reset the login to be able to download an older version of the master collection. The person who's email address was used has since left the company, how do you reset the login details to be able to download the software?

  • Loss of Image Selection after Camera Preset Update

    MAC OS X 10.4 LR 1.3.1 In Develop mode, I update a Camera Preset I created with "Update with the Current Settings". At that point I cannot choose any other images. It appears in the film strip that I have selected a new image, but the workspace area

  • Dropped frames question

    Late 2007 MacPro/5G RAM/Editing to dedicated internal scratch disk/HDV sequence/AIFF Audio 48khz/FCP Version 6.0.4 I don't know why I am having this problem, but whenever I try to play a sequence, it plays fine when it is playing through a rendered v