The above code is a part of some html page.Now, how can the javascript: crop-now.js read the height and weight? Also, please note that window.location.href will refer to the parent html, not this javascript.