July 24th, 2013, 02:22 AM
-
Very difficult to explain. On blur reload the from, focus on 'clicked' element
Hi;
On blur I reload a form in the div. All working fine the problem is newlly reloaded form does not have any focus.
I need to find a way to put the focus on the clicked element.
How can I pass what element has been clicked when I am using onblur?
And I cannot use "onclick reload form", it has to be "onblur relaod form".
I know its a bit vague, but I really appreciate any help.
EDIT:
Onclick happens before onblur, I might be able to change some input values like that and pass them to the other form!
Thanks
Last edited by zxcvbnm; July 24th, 2013 at 02:25 AM.
July 24th, 2013, 04:41 PM
-
Originally Posted by zxcvbnm
On blur I reload a form in the div. All working fine the problem is newlly reloaded form does not have any focus.
When you say "reload"; do you mean you reset the form or create a totally new form?
Originally Posted by zxcvbnm
I need to find a way to put the focus on the clicked element.
How can I pass what element has been clicked when I am using onblur?
Just pass the element's id attribute to your function and then focus() on that element's id, from within your function..., after you "reload" the form.
July 24th, 2013, 06:44 PM
-
Originally Posted by web_loone08
When you say "reload"; do you mean you reset the form or create a totally new form?
Yes. A whole new page.
Originally Posted by web_loone08
Just pass the element's id attribute to your function and then focus() on that element's id, from within your function..., after you "reload" the form.
I can't because I am reloading the form onblur (of the currently focused element).
Edit:
I guess onblur I have to update each form box individually! That's the only solution I can come up with.
Last edited by zxcvbnm; July 24th, 2013 at 07:11 PM.
July 24th, 2013, 08:34 PM
-
You could always send the last focused element's id to the next page; with the sessionStorage() Object or send it in a query string.
July 24th, 2013, 10:38 PM
-
Originally Posted by web_loone08
You could always send the last focused element's id to the next page; with the sessionStorage() Object or send it in a query string.
Hi;
I sent you a privat emessage with the link 
Please let me know what you think. Thanks