Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
14
rated 0 times [  18] [ 4]  / answers: 1 / hits: 59981  / 11 Years ago, mon, march 11, 2013, 12:00:00

I am having a form in a page for registering various entertainment programs on a particular stage. After submitting all the details and clicking on submit button, it should check whether a program exists on that stage on the particular day. If any program exists, a div should show the existing program with the full details.My issue is that if any program exists, i need to make the focus on that newly generated div (I mean that div should be visible,no editing is required). I need it because, div is generated with the help of AJAX and the form is so lengthy, so user cannot see the div generated, unless he/she scrolls upward.
NB:The div is created in the top position.
Is there any way to make the div portion to be visible after form submitting


More From » javascript

 Answers
21

Using the following statement works for me.



document.getElementById('id').scrollIntoView();

[#79676] Saturday, March 9, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jarod

Total Points: 62
Total Questions: 111
Total Answers: 83

Location: Saint Vincent and the Grenadines
Member since Sat, Sep 11, 2021
3 Years ago
jarod questions
;