On Fri, 2002-08-23 at 15:56, Tavis Rudd wrote:
> On August 23, 2002 01:42 pm, Ian Bicking wrote:
> > You're definitely right on this. I wonder, though, if there's a way to
> > access the fragment through JavaScript? I can't remember why, but I've
> > wanted to do this before.
>
> window.location.hash.
>
> I'm working on a page that has a listing of many items, one per row. Each row
> has a form so that the user can modify metadata. When the user saves their
> changes the forms will post back to the same page. I wanted to reload the
> page on the specific row the user was looking at, rather than reloading at
> the top of the page. If I set each form's action on the WebKit side I
> couldn't do that as I didn't have access to the #fragment. In the end, I
> used the form's onSubmit event handler to set theForm.action =
> window.location.href before submitting.
I was doing something like this. It was a pain to get working, but it
involved hitting a link that make a popup window go up, and it saved
where the document was scrolled to. Then when you submitted in the form
in the popup window, it reloaded the master window (with a new URL, to
force reload), which involved a little (dynamic) Javascript that got run
on page load, which rescrolled the page back to where it was. If you
want it I can dig up the code -- not much code, and I remember the were
problems which I don't know if I fixed (on some platforms), but it
seemed like the best way to do it.
Ian
|