Hi
I have a small web page on my embedded device with such code:
<th width="310"
DHCP Relay:
</th>
<td> </td>
<td>
<% nvram_get("rg_dhcp_relay_enable""); %>
</td>
where 'nvram_get' returns either 1 or 0.I have two questions in this connection:
(1) I'd like to print "ON" or "OFF" instead of 1 or 0 respectively. Is it possible to do in <%...%> something like "if .. then .." or there is another way?
(2) This code works fine whenever I reload page. Also on this page I have select list, and I'd like the above text to be changed accordingly to item selected from list.
So I decided to write a JavaScript function and hook it on 'onChange' event. Sounds reasonable? I only don't know how to modify the text within .. from JS function.
Anyh ideas? Thanks!