[SOLVED] Open window in script tag changed

getPreviousValue can return null if the initialChange flag is set: