Thanks Axel, your solution is working!

Op 23-2-2011 13:38, Axel Morgner schreef:
Then maybe append the anchor part via JS to the form action url:

checkbox.setAttribute("onclick", "this.form.action = this.form.action + '#anchor'; form.submit();");

(untested!!)

Axel

[1] http://stackoverflow.com/questions/979024/changing-the-action-of-a-form-with-javascript-jquery

Am 23.02.2011 13:29, schrieb AH Jaworski:
Yes, but for accessibility reasons, the anchoring method would be in my favour.

Regards,

Antek

Op 23-2-2011 13:05, Bob Schellink schreef:
Hi,

Isn't easier to use JS to accomplish this? You could store the pageY offset and restore it when the
page loads? jQuery or other JS libs might even have plugins for this.

Kind regards

Bob

On 2011/02/23 13:56 PM, AH Jaworski wrote:
Yes, I think this would be the ideal solution, but the setActionURL() does not set the actionurl for the already rendered form. After the submit the actionurl is updated, but then I need another
refresh to go to the anchor.

Is there a way to override the actionurl of the form triggered by an onclick-action?

Regards,
Antek


Op 22-2-2011 12:26, Axel Morgner schreef:
Or as an alternative, try

myForm.setActionURL(myForm.getActionURL().concat("#anchor-123"));

Axel

On 22.02.2011 12:23, Axel Morgner wrote:
You're right.

Is it an option for you to set the form action URL explicitely? E.g. like

     myForm.setActionURL("my-page.htm#anchor-123");

Greetings

Axel

On 22.02.2011 12:11, AH Jaworski wrote:
But in the dynamic form the refresh gets initiated with: checkbox.setAttribute("onclick",
"form.submit();");

I don't think it's possible to give a parameter with the submit or is it?
greets
Antek

Op 22-2-2011 12:03, Axel Morgner schreef:
Hi,

good question. I've helped myself by adding something like that:

     setRedirect(getRedirect().concat("#anchor-123"));

I'm using anchors to set the active tab, together with jquery-tabs.

Support for anchors in Click would be cool ...

Greetings

Axel

On 22.02.2011 11:17, AH Jaworski wrote:
Ive implemented a dynamic form as shown in the example:
http://click.avoka.com/click-examples/form/dynamic/dynamic-form.htm

After the submit takes place, you're redirected to the top of the page. This is good when you have a small form, but with bigger forms it is not very user friendly. Is there a way to avoid this behaviour? Maybe a solution which includes anchoring or something like that?

Thanks in advance




Reply via email to