I would like to run the following code but only if the condition is that the url contains "Mode=edit" somewhere. (If I run it on every page it gives error).
<script language='javascript'>
function Save() {
__doPostBack('ctl00$MainContentPlaceHolder$btnSave', '');
}
function Redirect() {
window.location = "SessionTimeout.aspx"
}
window.onload = function () {
setTimeout(Save,15000);
}
</script>
How can I have it check for that portion in the url and only then run this script above?