Javascript Redirect - Wrong redirect

I use the javascript redirect function, to redirect whenever a form has completed the processing.

It use it like this:

redirect("?i=login"); //On the page. http://www.domain.com/folder/?i=index

Although, it redirects to: http://www.domain.com/folder/www.domain.com/folder/?i=login

Why is that?

Upvotes: 1

Views: 459

Answers (1)

Emil Ivanov
Emil Ivanov

Reputation: 37633

Use window.location.assign('?i=login');

Upvotes: 2

Related Questions