About this question
I have a Sharepoint2010 site and am trying to execute a Javascript code to create some drop down selection menus with a GO button at the end. The GO button is supposed to run a function that does a URL redirect via the [removed] command based on the choices in the dropdown. I have this saved in a TXT file then called within a CEWP.
The snippet of code that I believe is having issues is with the function or the button itself.
This is what I have at the moment in a simplified form:
function submitGo(){
[removed] = "www.google.com"
}
<button onclick="submitGo()">Go</button>
But when I load my page and click the GO button it just reloads my sharepoint page and does not perform the redirect. I have tried replacing the function in the command with the [removed] command directly and it does the same thing. I am at a complete loss as to why this is not working.