DotNetNuke Text\HTML Javascript Redirect

I am sure this is a very stupid question, but I am rather new to web coding.
I am trying to make a simple little form in DotNetNuke with a Text\HTML module that will allow me to have a couple text entry boxes, and append those as querystring variables to a javascript redirect button. When I try do this with window.location.replace('URL') in my onclick, it just refreshes back to the same page (not the page I want to redirect to). when I use'url') that works, but it goes to a new window.
What am I doing wrong?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

- Try window.location = yourURL;
function redirect()
        location.href = "newURL";
markterryAuthor Commented:
Neither work, also alert("Hello World!"); does work. I am starting to think there is something in the CMS stopping this code.
also thatyu888888, I thought windows.location causes a loop when people use the back button.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

markterryAuthor Commented:
okay, new news... window.location.redirect works in IE, but not Chrome or FireFox. So kinda good, but obviuosly I would want it to work in all browsers.

works on IE,Chrome and FireFox too....
I have tried following code:

function redirect()
<input type=button onclick=redirect();>

Hope it will help.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
markterryAuthor Commented:
that indeed does the trick talktohand. adding the window before location.href seems to be working.
markterryAuthor Commented:
Thank you for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.