problem in detecting the embeded node by javascript?

5 views
Skip to first unread message

vishnumurthy prabhu

unread,
Jun 17, 2010, 12:54:06 AM6/17/10
to Native-Client-Discuss
I have developped nacl application as given in examples and tried to
embed in the html document with the help of embed tag. The problem is
inorder to make call the to native client module via javascript, I
need to have access to the embeded node which is made possible by
getElementById(<id of embeded tag>).
I am doing so by calling the a function onload event as given in few
of the examples which comes along with nacl-sdk. But it returns
blank(getelementbyid). actual code snippet is as follows:
javascript:
var global_stack=null;
function onObjLoad()
{
global_stack=document.getElementById('mystack');
alert(global_stack);
}
in body of HTML doc, I have:

var nexes = 'x86-32: stack.nexe\n';
contentDiv.innerHTML = '<embed name="nacl_module" '
+ 'id="mystack" '
+ 'width=0 height=0 '
// + 'nexes="' + nexes + '" '
+ 'type="application/x-nacl-srpc" '
+ 'onload="onObjLoad()" />'; -------(1)
document.getElementById('mystack').nexes = nexes;onObjLoad(); -----
(2)

(1) value of global_stack=[Object embedElement]
(2)global_stack=
It is blank. so, I dont have access to nacl module. can any one tell
what is the problem?

Victor Khimenko

unread,
Jun 17, 2010, 1:08:35 AM6/17/10
to native-cli...@googlegroups.com

On Thu, Jun 17, 2010 at 8:54 AM, vishnumurthy prabhu <prabhuvis...@gmail.com> wrote:
It is blank. so, I dont have access to nacl module. can any one tell what is the problem?


 
--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To post to this group, send email to native-cli...@googlegroups.com.
To unsubscribe from this group, send email to native-client-di...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/native-client-discuss?hl=en.


vishnumurthy prabhu

unread,
Jun 17, 2010, 3:09:57 AM6/17/10
to Native-Client-Discuss
I am also getting following error message on the terminal:

[5467:5472:4337715752:ERROR:base/native_library_linux.cc(28)] dlopen
failed when trying to open /home/vishnumurthy/.mozilla/plugins/
sel_ldr_bin: /home/vishnumurthy/.mozilla/plugins/sel_ldr_bin: cannot
dynamically load executable

On Jun 17, 10:08 am, Victor Khimenko <k...@google.com> wrote:
> On Thu, Jun 17, 2010 at 8:54 AM, vishnumurthy prabhu <
>
> prabhuvishnumur...@gmail.com> wrote:
> > It is blank. so, I dont have access to nacl module. can any one tell what
> > is the problem?
>
> > The problem is probably bug #500:
>
> http://code.google.com/p/nativeclient/issues/detail?id=500
>
> Take a look on "hello, world" example:http://code.google.com/p/nativeclient-sdk/source/browse/trunk/src/exa...
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Native-Client-Discuss" group.
> > To post to this group, send email to
> > native-cli...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > native-client-di...@googlegroups.com<native-client-discuss%2Bunsu...@googlegroups.com>
> > .

Ivan Krasin

unread,
Jun 17, 2010, 3:12:29 AM6/17/10
to native-cli...@googlegroups.com
On Thu, Jun 17, 2010 at 11:09 AM, vishnumurthy prabhu
<prabhuvis...@gmail.com> wrote:
> I am also getting following error message on the terminal:
>
> [5467:5472:4337715752:ERROR:base/native_library_linux.cc(28)] dlopen
> failed when trying to open /home/vishnumurthy/.mozilla/plugins/
> sel_ldr_bin: /home/vishnumurthy/.mozilla/plugins/sel_ldr_bin: cannot
> dynamically load executable
Looks like your sel_ldr_bin is expired. Try to update it.

>
> On Jun 17, 10:08 am, Victor Khimenko <k...@google.com> wrote:
>> On Thu, Jun 17, 2010 at 8:54 AM, vishnumurthy prabhu <
>>
>> prabhuvishnumur...@gmail.com> wrote:
>> > It is blank. so, I dont have access to nacl module. can any one tell what
>> > is the problem?
>>
>> > The problem is probably bug #500:
>>
>> http://code.google.com/p/nativeclient/issues/detail?id=500
>>
>> Take a look on "hello, world" example:http://code.google.com/p/nativeclient-sdk/source/browse/trunk/src/exa...
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups
>> > "Native-Client-Discuss" group.
>> > To post to this group, send email to
>> > native-cli...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > native-client-di...@googlegroups.com<native-client-discuss%2Bunsu...@googlegroups.com>
>> > .
>> > For more options, visit this group at
>> >http://groups.google.com/group/native-client-discuss?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
> To post to this group, send email to native-cli...@googlegroups.com.

> To unsubscribe from this group, send email to native-client-di...@googlegroups.com.

Victor Khimenko

unread,
Jun 17, 2010, 5:01:03 AM6/17/10
to native-cli...@googlegroups.com
On Thu, Jun 17, 2010 at 11:09 AM, vishnumurthy prabhu <prabhuvis...@gmail.com> wrote:
I am also getting following error message on the terminal:

[5467:5472:4337715752:ERROR:base/native_library_linux.cc(28)] dlopen
failed when trying to open /home/vishnumurthy/.mozilla/plugins/
sel_ldr_bin: /home/vishnumurthy/.mozilla/plugins/sel_ldr_bin: cannot
dynamically load executable

Looks like you are trying to use external NaCl plugin (probably remains of some previous experiments?). That's why I've asked about:version . Correct version looks like this:
Google Chrome6.0.427.0 (Official Build 49010)
WebKit534.1
V82.2.12
User AgentMozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.1 (KHTML, like Gecko) Chrome/6.0.427.0 Safari/534.1
Command Line/opt/google/chrome/google-chrome --enable-nacl       --internal-nacl --enable-gpu-plugin
 
Note: you need version 6.x and must make sure --enable-nacl flag is there (--internal-nacl and --enable-gpu-plugins are added automatically).

David Springer

unread,
Jun 17, 2010, 12:30:56 PM6/17/10
to native-cli...@googlegroups.com
It's possible that you have an instance of the old FireFox plugin for NaCl installed.  You will have to uninstall it.  Then, as Victor correctly points out, run Chromium with --enable-nacl.

If you are on a Linux computer, make sure that you have hardware 3D acceleration turned on, otherwise the 3D examples will not work.

--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To post to this group, send email to native-cli...@googlegroups.com.
To unsubscribe from this group, send email to native-client-di...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/native-client-discuss?hl=en.



--
- Dave.S
Reply all
Reply to author
Forward
0 new messages