Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change document url w/o page reload

Status
Not open for further replies.

treebuddy

Technical User
Jul 26, 2005
5
US
Is there a way to change the url that shows in the address bar via the onLoad event without the brower re-requesting using that new url. I tried a few ways: location, location.href, document.location. The thing is I have args in the url, something like '.html?action=copy'that I want to take remove after the new page loads (leaving some other args) so that on a browser refresh, the actions that they run on the servers are not repeated.

The problem that I am having is with request tracker, my page returns a dynamic 'results' box on the page that goes away when I change the url and the page refreshes.

Thanks for any insight.

Ryan
 
Does it take a lot of code to keep the url args from being re-requested when using the browser refresh?
 
I do not claim to know all things, of course this could be a problem. The thing is, I only want to get rid of one of the args ....html/?id=3&action=run taking off the action=run part, not change the whole domain address.

Maybe suggestions of how to capture the browser refresh action so that it will not resubmit?
 
Instead of using a url with parameters, make a hidden form with method="post" and submit that via javascript. Then you won't have anything attached to the url.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Thanks for the tip on the hidden forms. The thing is, I am customizing an already made perl app, RT (Request Tracker) and I am not really using forms. I am kindof sticking with the way that it was already being done, I just decided to give an alert saying not to use the refresh button, the users are supposedly technical so they should be ok.

Now that I am thinking about it, with post there is still the chance that the fields will resubmit.

Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top