Changing url

I have an ajax form. When it doesn't get saved, I just
params[:not_saved] = true
render :action => :index

view:
<% if params[:not_saved] %>
//show the form
<% end %>

On the form, I have a link_to_remote "Cancel" to close the ajax form,
but hitting cancel doesn't change the url. This is the URL:
http://localhost:4000/auth_user/save_requirement.

rjs:
page[:form].visual_effect :slide_up

How can I change the url without redirect_to ? When a user hits
'cancel', I want the URL to not include '/save_requirement' anymore.

Thanks!

You can always change the URL via the JavaScript property
window.location. However, if you set it, you'll get redirected to
that URL. The standard AJAX solution is to set window.location.hash,
which will modify the URL to indicate state change, but will not
redirect user to a new page. More can be learned from http://ajaxpatterns.org/,
just search for 'bookmarkability'.

Eric