tags:

views:

340

answers:

1

I'm developing apps at Facebook using FBML and FBJS. When I tried to use document.getElementById to read tag, it did not reply the correct value. Can we really use this command on FBML to get data?

Here is detail of my code :

<input type="hidden" value="123" id="number"/>
<a href="#" onclick="new Dialog().showMessage('Dialog', document.getElementById('number').value);return false"/>
+1  A: 

I found the answer. We can access the value by :

<input type="hidden" value="123" id="number"/> <a href="#" onclick="new Dialog().showMessage('Dialog', document.getElementById('number').getValue());return false"/>

Willy