the javascript is
document.url.hash="#..."
you can call that on document load (never tried).

http://www.unix.org.ua/orelly/web/jscript/refp_419.html

Cheers,
Ron





ציטוט Doug Lochart:
I am not a javascript superstar but I bet there is a way so simulate an
anchor click just like a button click. So in my response I could
add the positional anchor tag and then onLoad I have a function that
simulates a click on a link to affectively click the #link.
Is this possible?

On 11/4/05, Hensley, Richard <[EMAIL PROTECTED]> wrote:

In order to get a browser to navigate to the anchor, you need to use the
#xyz syntax on a get url. You could change your submit link to be get, but
I'm not sure how you would get the #xyz syntax on then end of the URL.

Richard

-----Original Message-----
From: Doug Lochart [mailto:[EMAIL PROTECTED]
Sent: Friday, November 04, 2005 1:49 PM
To: Tapestry users
Subject: Re: help with positional page anchors, please

first off thanks for the help. forgive me if I am repeating myself here
or
if I have my dunce hat on here)
Having the tag in the page is easy. But when they press the button to
submit
the search query (which is handled by a listemer method)
how do I tell the page to go to the anchor? I mean All I do is do a db
search, populate a persistent property and return from the method.
The table component fills in the data on render but as I am simply
returning
from a listener method how do I affect a positioning to the anchor?

thanks

Doug

On 11/4/05, Hensley, Richard <[EMAIL PROTECTED]> wrote:

Doug, if your positional page anchors don't have variable data, just

do it

the old fashioned way with the <a name="anchor">This is my anchor</a>

No Tapestry magic needed.

Remember, Tapestry emit's as is anything in the template that does not
have
a jwcid.

Richare

-----Original Message-----
From: Doug Lochart [mailto:[EMAIL PROTECTED]
Sent: Friday, November 04, 2005 1:31 PM
To: Tapestry users
Subject: help with positional page anchors, please

Is this too easy of a question or has noone ever encountered it before
(I doubt that)
I searched the archives and found 1 thread for it but it was not
helpful.

All, ( I am using Tapestry 3.0.3 )

As of now I am NOT using the Redirect-after-Post pattern YET but I may
need
to to protect against users hitting the refresh button.
That being said here is my issue:

I have a search page that allows the user to enter in criteria and
perform
the search. When a search is performed I go get the data
and populate the bottom of the page with a table (component) of all

the

results. In my listener I simply retrieve the data and then return

which

will re-render the same page.

I need/want to keep the results and the criteria together on the same
page
so that the user will be able to see what they searched for.
The problem is that the results appear below the criteria and off the
viewable portion of the page.

I would like to provide an anchor tag to the area above the results
table
and then have the page (when re-rendered) position itself at the

results

as if I was using page#section style of anchor link.

How would I do this seeing how I am just returning from a listener?

Any thoughts?

Thanks!



--
What profits a man if he gains the whole world yet loses his soul?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
What profits a man if he gains the whole world yet loses his soul?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
What profits a man if he gains the whole world yet loses his soul?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to