• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Dynamically Scrolling to the newly added row in HTML table.

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have a table in Iframe, I am adding the rows in the table dynamically.
I want the newly added row to be Visible/(to be scrolled) in the page.

If anyone knows this ? I tried the scrollIntoView() method of Ie but its not working..

Any Ideas??

Thanks in advance.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In this table row is there any form elements? If there is there is a simple solution of calling a form element and setting its focus.

Eric
 
Anurag Mishra
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric,

Thanks for the reply but the focus won't scroll in the table rows and display the newly created row which I have added dynamically.
I tried to ficus that row by assigning one Id to the slement in the row but it did't worked.

Do you have some other idea.

thanks.
 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Anurag...

May be this answers your question....

I have an application wherei generate rows dynamically, using the "inerHTML" option. I generate som number of rows into a div. Once the row count is more than three, i am setting a scrollbar, in that particular portion of the HTML page.

Is this what you mean by "to be scrolled"?

Cheers,
Swamy
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swamy, that is not what is happening here..


Try playing with this code that I just wrote...



Eric
 
Anurag Mishra
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric and Swamy thanks a lot for your reply I will work with your suggestions.

thanks a lot.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic