Javascript within Javascript question


Active member
I created a form which I placed in a .js file. The form works fine, but I need to redirect users to another page once the submit button is clicked.

<input type="button" onClick="document.location.href=''" />
as you can imagine, the two slashes comment out whatever comes next.

My question is, how do I enter the url so that it isn't commented out?


p.s. this forum has grown quite a bit, I'm not sure if this is the right section. Feel free to move this thread if necessary.


XenForo moderator
Staff member
Do you just need to escape the slashes or have you tried just www. without the http:// ?