Log in

View Full Version : JavaScript: Trying to toggle the inlinemod checkbox


K33
10-16-2005, 07:28 PM
Hello
I am trying to toggle a checkbox externally, I have added a radio button for the moderators to mark posts. So when they select this radio button I want the action to be similiar to checking the checkbox eg the post going yellow.

I have tried the following code but for some reason it doesnt work:
obj = document.getElementById('plist_'+nPostId);

inlineMod.toggle(obj);

Any ideas what I am doing wrong?

There are no javascript errors, the screen just flashes and nothing happens.

figured it out

obj = document.getElementById('plist_'+nPostId);
obj.checked = true;
inlineMod.toggle(obj);