Updating loadFrame func with onchange attribute change