my issue is, that the following script with its window.location function doesn't work in a sharepoint content editor webpart. I've tested it as a standalone and it worked fine, but as soon I inserted it in the content editor webpart nothing seemed to happen when the script was executed.
I would appreciate any kind of help
<script type="text/javascript">
function redirect(){
var search = document.getElementById('searchtxt').value;
var url = "test.com/test.aspx?s="+search;
window.location = "http://"+url+"";
return;
}
</script>
<input type="text" id="searchtxt"/> <input type="submit" value="Search" onclick="return redirect()"/>
return
from theonclick
and it should work.