Notes error : document.getElementById is not a function

Hi,

I’ve got a problem with javascript code.

my code is

document.getElementById(“MsgFDV”).style.visibility=“visible”;

This code works fine in web browsers, but in Notes I get an error :“document.getElementById is not a function”.

I tried the code

document.all[“MsgFDV”].style.visibility=“visible”;

but I get the error “document.all has no properties”.

Could somebody help me ?

Thanks in advance!

Philippe

Subject: Notes error : document.getElementById is not a function

Have you see this :

https://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/37244879ecaab32a852570420054cc71?OpenDocument

https://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/e6a7005bcd0613f8852570f9000ec9f9?OpenDocument

Subject: RE: Notes error : document.getElementById is not a function

Thanks Thierry,

I haven’t seen this. But I can use it : I want to acces to a computed text, not a field, and a computed text does not have a name I can use.

I think the only way to acces to it is to use its Html ID.

But I don’t know how to do that in Notes client.

Or Is there another way ?

Subject: RE: Notes error : document.getElementById is not a function

Not sure that you can this (DHTML) in Notes Client… maybe in Release ???

But you can have another approach : create a hidden field (text, editable), let’s say “hide” with default value “0”

for your computed text use a hidden formula like this hide=“1” and create a button (action,…) to set “1” (@SetField(“hide”;“1”);

@Command([ViewRefreshFields])formula) to “hide” field…

This method will work on Web et Notes clients but cause a refresh form…

(or append this method for Notes Client and keep JS method for Web client, not really fun, but I suppose that you have already think of that…)

Thierry

Subject: RE: Notes error : document.getElementById is not a function

Thanks for response.

I appended you method for Notes client, and keep JS method for web.

Maybe not really fun, but it worked fine.

Thanks again for your help Thierry !