Terry,
you can't do both.
Probably your best option is to pass a parameter as part of the URL call. Note that the call to index.htm, and the server-side-code can run in either order - you can't predict which one will happen first, because they're running on different threads.
So add a parameter, and do a p_web.StoreValue in the destination procedure.
cheers
Bruce