Visvalor
July 22nd, 2010, 22:19
I use this script in my numberfields all the time...
<script>
function onInit()
if not User.isHost() then
setReadOnly(true);
end
end
</script>
However I want to toss the same effect into a few checkboxes. But when I put the script in, it makes the checkbox disappear :\
Any advice?
<checkbox name="deathmagic">
<anchored>
<left>
<anchor>left</anchor>
<offset>405</offset>
</left>
<top>
<anchor>top</anchor>
<offset>640</offset>
</top>
<size>
<width>15</width>
<height>15</height>
</size>
</anchored>
<stateicons>
<on>indicator_checkon</on>
<off>indicator_checkoff</off>
</stateicons>
<script>
function onInit()
if not User.isHost() then
setReadOnly(true);
end
end
</script>
</checkbox>
<script>
function onInit()
if not User.isHost() then
setReadOnly(true);
end
end
</script>
However I want to toss the same effect into a few checkboxes. But when I put the script in, it makes the checkbox disappear :\
Any advice?
<checkbox name="deathmagic">
<anchored>
<left>
<anchor>left</anchor>
<offset>405</offset>
</left>
<top>
<anchor>top</anchor>
<offset>640</offset>
</top>
<size>
<width>15</width>
<height>15</height>
</size>
</anchored>
<stateicons>
<on>indicator_checkon</on>
<off>indicator_checkoff</off>
</stateicons>
<script>
function onInit()
if not User.isHost() then
setReadOnly(true);
end
end
</script>
</checkbox>