Aurigma Forums
»
Legacy Products
»
Archive
»
Image Uploader
»
java uploader calls progress func with java object, not string
Rank: Member
Groups: Member
Joined: 9/22/2006(UTC) Posts: 5
|
Hi - using FF, WinXP: in the javascript progress-handler function example - ImageUploader_Progress(Status, Progress ... ) if one does "typeof Status" one gets "object" - it's often automatically recast as string depending on what javascript is using it, but for example a switch(Status) { case: 'COMPLETE' } will fail because it evidently remains an object. If one attempts to call functions such as valueOf(), one gets a javascript error about the JAVA class not having that function defined, ie it looks like "Status" is actually a reference to a java string object... I'm not at all a java programmer, but maybe it can be passed as a plain string to make things a touch easier in javascript. I ended up using a hash (associative array) to get javascript to allow me to use it in the switch/case structure. Hugh
|
|
|
|
Rank: Advanced Member
Groups: Joined: 8/3/2003(UTC) Posts: 998
|
Hello, You are right. The strings passed by the applet to the JavaScript method have the type of java.lang.String. You could convert it to JavaScript string at the beginning of the method. |
|
|
|
|
Aurigma Forums
»
Legacy Products
»
Archive
»
Image Uploader
»
java uploader calls progress func with java object, not string
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.