I am in the process of evaluating your product for a website my company is working on. Everything was working great until I added an ajax call that re renders a table on my page when certain events happen. After the refresh happens the MP3 Applet stops responding to java script calls. Note that the ajax call does not change anything with the applet reference or refresh the applet's html. The table in question is completely separate. The errors we recieve happen everytime we try to run a javascript method that controls the applet. For example: "RPApplet.RECORD is not a function" or "RPApplet.PLAYBACK is not a function" I will see if I can throw together a simpler example to reproduce the problem that I can post here, but until then I was wondering if there were any known issues with ajax calls on a page with your applet being used in Fire Fox. Note that the page works perfectly in Internet Explorer 7.
Thanks,
Nathan
Mp3 Recorder Applet w/ Ajax call in FireFox 3.0.7 issue
Started by Nathan F, Mar 25 2009 02:02 PM
5 replies to this topic
#1
Posted 25 March 2009 - 02:02 PM
#2
Posted 26 March 2009 - 02:49 PM
It seems after AJAX call javascript loses the applet refernce and because of this javascript thinks RPApplet.RECORD is JS function, tries to find it and fails doing this reporting "RPApplet.RECORD is not a function". How do you get the reference on applet, do you get it by ID ? Maybe you get it through object hierarchy and after AJAX call this hierachy is changed so JS loses the applet refernce.
Send us source code of this page and we will try to help you
Send us source code of this page and we will try to help you
#3
Posted 30 March 2009 - 08:24 PM
QUOTE (Sergey @ Mar 26 2009, 09:49 AM) <{POST_SNAPBACK}>
It seems after AJAX call javascript loses the applet refernce and because of this javascript thinks RPApplet.RECORD is JS function, tries to find it and fails doing this reporting "RPApplet.RECORD is not a function". How do you get the reference on applet, do you get it by ID ? Maybe you get it through object hierarchy and after AJAX call this hierachy is changed so JS loses the applet refernce.
Send us source code of this page and we will try to help you
Send us source code of this page and we will try to help you
I've gotten back to looking into this issue. I noticed something in the java console today that comes up after the table is refreshed by the AJAX call. After the excpetion below happens is when I lose the ability to access the applet. This is an excpetion being thrown by the applet correct? Any idea what might be causing that and a way to work around it?
Again this only happens in firefox and works fine in IE.
current Java specification version: 1.6
local file hash: bc6865f5f6741c5ab07bd0c274ae8359a081d95a
Exception in thread "AWT-EventQueue-2" java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at sun.awt.Win32GraphicsConfig.createAcceleratedImage(Unknown Source)
at sun.awt.windows.WComponentPeer.createImage(Unknown Source)
at java.awt.Component.createImage(Unknown Source)
at java.awt.Component.createImage(Unknown Source)
at aa.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Thanks
-Nathan
#4
Posted 02 April 2009 - 01:09 PM
It seems, you forgotten to define the WIDTH and HEIGHT parameters or defined them <0 in the source code of applet call.
Therefore you got exception: "Exception in thread "AWT-EventQueue-2" java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0"
Please define these parameter correctly. I recommend you WIDTH=374 HEIGHT=24.
To better understand how to define them, please look into source code of example web page record_app_mp3_JS.php . It is in the SDK package.
Therefore you got exception: "Exception in thread "AWT-EventQueue-2" java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0"
Please define these parameter correctly. I recommend you WIDTH=374 HEIGHT=24.
To better understand how to define them, please look into source code of example web page record_app_mp3_JS.php . It is in the SDK package.
#5
Posted 02 April 2009 - 01:46 PM
QUOTE (Sergey @ Apr 2 2009, 08:09 AM) <{POST_SNAPBACK}>
It seems, you forgotten to define the WIDTH and HEIGHT parameters or defined them <0 in the source code of applet call.
Therefore you got exception: "Exception in thread "AWT-EventQueue-2" java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0"
Please define these parameter correctly. I recommend you WIDTH=374 HEIGHT=24.
To better understand how to define them, please look into source code of example web page record_app_mp3_JS.php . It is in the SDK package.
Therefore you got exception: "Exception in thread "AWT-EventQueue-2" java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0"
Please define these parameter correctly. I recommend you WIDTH=374 HEIGHT=24.
To better understand how to define them, please look into source code of example web page record_app_mp3_JS.php . It is in the SDK package.
That is the first thing I cecked when I saw that error, but I do have the width and height set in the html.
<APPLET CODE='RPApplet.class'
ARCHIVE='RPAppletMp3.jar'
CODEBASE='https://loalhost:8443/AudioRecorder'
ALIGN='MIDDLE' WIDTH=380 HEIGHT=24
NAME='RPApplet'
ID='RPApplet'
MAYSCRIPT>
<PARAM NAME = cabbase VALUE = RPAppletMp3.cab>
<PARAM NAME = 'Registration' VALUE = 'demo'>
<PARAM NAME = 'ServerScript' VALUE = 'https://loalhost:8443/AudioRecorder/retrive.php>
<PARAM NAME = 'VoiceServerFolder' VALUE = 'voiceServerFolder'>
<PARAM NAME = 'TimeLimit' VALUE = '1800'>
<PARAM NAME = 'BlockSize' VALUE = '10240'>
<PARAM NAME = 'InterfaceType' VALUE = 'JS'>
<PARAM NAME = 'UserServerFolder' VALUE = 'serverFolder'>
<PARAM NAME = 'UserPostVariables' VALUE = 'name,country'>
<PARAM NAME = 'name' VALUE = 'userName'>
<PARAM NAME = 'country' VALUE = 'country'>
<PARAM NAME = 'Sampling_frequency' VALUE = '22050'>
<PARAM NAME = 'Bitrate' VALUE = '56'>
<PARAM NAME = 'backgroudColor' value = 'c0c0c0'>
<PARAM NAME = 'indicatorLevel1' value = '4664f0'>
<PARAM NAME = 'indicatorLevel2' value = '28c814'>
<PARAM NAME = 'indicatorLevel3' value = 'f03250'>
</APPLET>
#6
Posted 02 April 2009 - 03:28 PM
Please send me the source code of web page which you use to call the applet.
Send it on info@vimas.com
or make this web page with applet available for me via internet.
Send it on info@vimas.com
or make this web page with applet available for me via internet.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











