PDA

View Full Version : append query string info to a location value


mdo4
11-23-2004, 07:45 PM
Hello:

I'm working with a site in a frameset. The problem is when a user clicks a link within the main frame of the page, the location bar doesn't change. To work around this, I'm attempting to change the url using the location property. I'm having trouble setting that location bar with something like this: parent.location.search = "foo". How I have it set up is in the main frame, each link that I want to have alter the location bar when clicked, calls a function invoked my onClick to change the location bar's query string. The change happens, *but*, the link I want the main page to go to does not happen, the page stays put. I've tried a couple of things, I placed the changing of the query string code to be invoked by an onLoad event of the page I'm linking to. This almost works, the main frame goes to the desired page, but as soon as the parent.location.search is set it switches back. Has anybody had any luck in doing what I'm attempting? Anything helps!! Thanks.

Goldilocks
11-24-2004, 03:47 AM
I don't see how this is ever going to work. The address bar will always display the page that is being loaded, i.e. the frameset. That's why it doesn't change. If you try and change it to the address of the actual page within the frameset then surely that page will load in the full window rather than in the frameset. You can't load one thing and then display something else in the address bar.