It´s in it´s name, you need a frame.
Your code should work, but I don´t think "window" will.
You can reuse existing elements (document.getElementBy..) in Innovator to append your custom content. Or: One classic approach is to use an empty html frame element inside a regular Form.
But I wonder if this is the best solution for your use case.
Do you use the classification property in your ItemType? If not, this would be a much easier solution. Use two Forms for each classification. Button click then just changes the classification.