Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
pp  
#1 Posted : Tuesday, October 10, 2006 10:17:30 AM(UTC)
pp

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
Alex Makhov  
#2 Posted : Tuesday, October 10, 2006 4:44:57 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
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.
Sincerely yours, Alex Makhov UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
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.