added js to parse options form