php - Javascript won't href to another page -
this might sound stupid question, that's because is. there reason won't href page? click , literally nothing happens.
window.location.href = "http://theromdepot.com/roms/report.php?file=" + window.location.pathname + "/" + document.getelementbyid('title').innerhtml + "&issue=" + issue;
i made website functions same way , works fine. code else, it's sending information same way:
window.location.href = "rename.php?originalname=" + originalname + "&newname=" + newname;
there's strange going on because copied , pasted code other website work , had same issue. click button , nothing happens. put alert before , after href make sure function being called , is, no page change. not sure if php involved in way. can tell me what's going on here?
here's full page: http://pastebin.com/zhfhcymv
here's website in case: http://theromdepot.com/
in page, line of code:
window.location.href = "http://theromdepot.com/roms/report.php?file=" + window.location.pathname + "/" + document.getelementbyid('title').innerhtml + "&issue=" + issue
throws error , not execute:
uncaught typeerror: cannot read property 'innerhtml' of null
this presumably because document.getelementbyid('title')
returns null
because there no element in html id="title"
.
Comments
Post a Comment