Hi,
I need to do a toggle on display:none/block in an extension with javascript. For example: <input type="checkbox" onclick="document.getElementByName('testrow').style.display = this.checked ? 'block' : 'none';" />
Obviously this doesn't work because I can't use javascript in my extensions(?). Does anyone have a solution to this?
Thanks,
Alain
-----Original Message----- From: Alain Hi,
I need to do a toggle on display:none/block in an extension with javascript. For example: <input type="checkbox" onclick="document.getElementByName('testrow').style.display = this.checked ? 'block' : 'none';" />
Obviously this doesn't work because I can't use javascript in my extensions(?). Does anyone have a solution to this?
Thanks, Alain _______________________________________________
What are you trying to accomplish? Why can't you use JS? Would it work for you to do: $display = " display:block"; If ($condition) { $display = " display:none"; } return "<tr id="testrow" $display>";
Or whatever you are going for?
Good luck! -Courtney
mediawiki-l@lists.wikimedia.org