Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Could not convert Javascript argument error?
Old 08-07-2008, 10:35 AM Could not convert Javascript argument error?
Junior Talker

Posts: 1
Trades: 0
Hi...

We are using the Firefox verion 2.0.0.16. we are getting an error
"Could not convert Javascript argument" (NS_ERROR_XPC_BAD_CONVERT_JS) ."

objRecorder.RegisterMediaButtonEvents(document.get ElementById("AudioStart"), document.getElementById("stopRecord"));

We got the error in the above line.

script>
//Having the variable objRecorder
var objRecorder = document.getElementById("secondobj");

//Calling the Dll function
objRecorder.RegisterMediaButtonEvents(document.get ElementById("AudioStart"), document.getElementById("stopRecord"));
</script>

<input type="button" id="AudioStart" value="Record"/>
<input type="button" id="stopRecord" value="Stop Record"/>


Yes I have a RegisterMediaButtonEvents() function this haves two arguments RegisterMediaButtonEvents(object button1, object button2) We need to pass the html button as argument, we cannot able to pass this html button to object type in C#. It's working fine in IE, But in Firefox generates the above error.

Thanks,
Sankar R
langar is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-07-2008, 10:42 AM Re: Could not convert Javascript argument error?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
do you have firebug installed ?
It features a step-in/out/over javascript debugger, and could greatly help you

http://www.getfirebug.com

Once you are on your page, press F12 to open firebug, go on the "script" tab, select your js source file in the drop down (it's just aver the "html" tab, but not very obvious), and put a break (clik on the line number in the firebug panel) a bit before the error, or on the calling line.

Then, you will be able to inspect html element and js variables.
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 08-07-2008 at 10:44 AM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to Could not convert Javascript argument error?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10129 seconds with 12 queries