Start a horizontal scroll in the middle of a table?

Hello,
My demanding users are at it again. Although I am learning alot but lest I digress;-) Lets say I have a tableview with 72 columns that is one month for each year spanning over 6 years. No biggie but instead of the horizontal scroll starting at the left most point I would like start the scroll in the middle (say at column 36 or something) of the tableview. So if my tableview starts at 03/2002 in column 1 and goes to 03/2008 in column 72 I want the horizontal scroll to start at 03/2005(current month)in column 36 each time the table is rendered. I am using MVC and the tableview iterator(which I love).
I was hopeing that I could find something similar to a dropdown i.e. pre-populate a selected value and the dropdown starts at that selection not the top most one. Any one have any ideas where I could begin? I have searched this forum for 'horizontal' and 'scrolling' but no hits.
TIA,
Rich

Hello!
I gave the example from Thomas Ritter to the JS person here and he got it working. I can't take credit but I wanted to share it with the forum. Basically what happens is that the horizontal scroll will scroll to the right till the date column that is close to the current date. I say close to because some of the columns are in months so if the current date is 21-MAR-05 then the horizontal scroll will scroll right until MAR-05. Either way here is the code. As I said before I take no credit for it. I do have another question though. Anyone have any ideas how to change it so that I can pass it a date and have it scroll there instead of the current date?
<code>function lockCol(tblID) {
     var table = document.getElementById(tblID);     
     var cTR = table.getElementsByTagName('tr');  //collection of rows
     var coords = { x: 0, y: 0 };
     var now = new Date();
     var strMonthArray = new Array(12);
     strMonthArray[0] = "Jan";
     strMonthArray[1] = "Feb";
     strMonthArray[2] = "Mar";
     strMonthArray[3] = "Apr";
     strMonthArray[4] = "May";
     strMonthArray[5] = "Jun";
     strMonthArray[6] = "Jul";
     strMonthArray[7] = "Aug";
     strMonthArray[8] = "Sep";
     strMonthArray[9] = "Oct";
     strMonthArray[10] = "Nov";
     strMonthArray[11] = "Dec";
     strMonth = strMonthArray[now.getMonth()];
     year = new String(now.getYear());
     var today = now.getDate() + "-" + strMonth + "-" + year.substr(2,2);
     if (table.rows[0].cells[0].className == '') {
          for (i = 1; i < cTR.length; i++) {
               var tr = cTR.item(i);
               if(i == 1){
                    tr.cells[0].className = 'firstLocked';
                    innerloop:
                    for (j = 2; j < 100 ; j++) {
                         if(compareDate(today, tr.cells[j].innerText)) {                         
                              elt = tr.cells[j];
                              while (elt) {
                                   coords.x += elt.offsetLeft;
                                   elt = elt.offsetParent;
                         break innerloop;
               else{tr.cells[0].className = 'locked'}
     else {
          for (i = 1; i < cTR.length; i++){
          var tr = cTR.item(i);
          tr.cells[0].className = '';
     document.getElementById('tbl-container').scrollLeft = coords.x - 69;
function compareDate(date1, date2){
     a = date1.split("-");
     b = date2.split("-");
     day1 = parseInt(a[0]);
     month1 = a[1];
     year1 = a[2];
     day2 = parseInt(b[0]);
     month2 = b[1];
     year2 = b[2];
     if(year1 == year2) {
          if(month1 == month2) {
               if((day2 >= day1)) {return true;}
               else {return false;}
          else {return false;}     
     else {return false;}
}</code>
Cheers,
Rich

Similar Messages

  • Hi,  I had an update massage for a wile on my phone and yesterday I decided to do the update and so I downloaded the soft w. and started to install but in the middle of the process the phone got stocked and said to connect to iTunes and so i did it a

    Hi,
    I had an update massage for a wile on my phone and yesterday I decided to do the update and so I downloaded the soft w. and started to install but in the middle of the process the phone got stocked and said to connect to iTunes and so i did it and again the process gets interrupted first saying "the software on Iphone needs to be restored to factory settings or update" and so i do it..then it comes the message the an error -39 and I can not do it and it says that I need to restore..and so I do it..but its a circle and it never ends..and I have no phone since yesterday.. all my contacts, my work..
    Can any one help please?

    Hi
    A little information will be of a great help, witch iPhone did you upgrade, memory , and version of software ( iOS 8.x.x )?
    Try restarting you iPhone and make sure you have a god internet connection , get as close to your wifi router (1-3 meter / 2-9 feet ) as possible. Don't use restore to factory  settings before you tried other options .  And most imported du you have an iCloud backup.
    //Sorenc

  • I have a horizontal line across the middle of the ipod screen and the ipod and itunes won't sync.  What is the line and is it connected to the no sync.

    I have a horizontal line across the middle of the ipod screen and itunes and the ipod won't sync.  What is the horizontal line and is it connected to the no sync.

    Hey Dean Marvin,
    Thanks for the question. These two symptoms are probablyh related. To troubleshoot, let's try resetting your iPod:
    How to reset iPod
    http://support.apple.com/kb/HT1320
    Thanks,
    Matt M.

  • Hi my Canon ix6550 has started to stop printing in the middle of a job, what can I do?

    Hi my Canon ix6550 has started to stop printing in the middle of a job, what can I do? If I turn off the printer and turn it on again it will print but then it will do it again. Help please.

    I have tried re-installing the software and have unplugged and replugged the USB cable but to no avail. It keeps stopping after printing a couple pages. Is there no one from Cannon who can help me??

  • Horizontal Scrolls on the  main Stage

    Hi
    I am putting 11 movies containing 11 flv files on my main
    stage. All those movies have onMouse over and click events attached
    with them. As those movies are not going to fit on the main stage
    so when i am running the flash file, it is just displaying 5 of the
    11 movies and rest are being cut. Is there any way that I can code
    so that I will get the horizontal scrolls automatically if the
    movies are not going to fit on the screen? I am new to the 'stage'
    and AS3 concepts . Please help me out.
    All I need is to put 11 movies on the main stage with the
    horizontal scrolls.
    Thanks in advance for your help
    regards
    Anuj

    you can check a similar thread involving a scrolling
    movieclip:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=665&threadid =1324923&enterthread=y

  • How to insert row in the middle of a table so that the below content will move to another page?

    I'm making a huge form in LiveCycle Designer. I want to be able to add rows in the middle o the table but in a way that the content below will move down automatically in a way it doe's in Word for example.
    Sometimes I am adding a very high new row in the middle of a page and I want the content in the below rows to be moved to another page and if it is necessary I want a new page to be automatically created on the bottom of a document or something.
    Is this possible or do I have to move everything by hand if I add new row to a table?

    If you are adding the rows at the runtime by clicking a button, then you have to use the instance Manager to add rows.. It will add rows at the end and then you need to write code to move the row at the desired location by using the moveInstance method of the instanceManager.
    If you are adding a row at the design time, then you can right clcik the row and choose to add rows below.
    Thanks
    Srini

  • Scroll all the rows in a table except the first row

    I have an HTML table
    for eg...
    <html>
    <div style="height:100px;overflow:auto">
    <table>
    <tr><td>xyz</td></tr> ///this row should not scroll
    <tr><td>123</td></tr> ///the rows repeated 100 times to allow scrolling
    </table>
    </div>
    </html>
    it gives me a nice table with a vertical scroll bar. What I want is my first row should not scroll. The scroll bar should be applicable from rows 2-100. I am not able to use this <div> tag exclusively to <tr>. Any inputs as to how this can be achieved.
    Raghav

    The whole problem is I lose the table alignment. if I have a table like
    <table>
    <tr><td>heading1</td><td>heading2</td><td>heading3</td></tr>
    <tr><td>value1</td><td>value2</td><td>value3</td></tr>
    <tr><td>value1</td><td>value2</td><td>value3</td></tr>
    <tr><td>value1</td><td>value2</td><td>value3</td></tr>
    <tr><td>value1</td><td>value2</td><td>value3</td></tr>
    <tr><td>value1</td><td>value2</td><td>value3</td></tr>
    //so on
    </table>
    all my rows from 2-99 are aligned properly under the first row.
    If I have a <div > tag or a new table for row "2-99"..the alignment is gone. "value1", value2 and value3 dont fall exactly under "heading1" "heading2" and heading3 respectively. I hope I made my point.
    <table>
    <tr><td>heading1</td><td>heading2</td><td>heading3</td></tr>
    <tr><td>
    <div style="height:100px; overflow:auto">
    <table>
    <tr><td>value1</td><td>value2</td><td>value3</td></tr>
    <tr><td>value1</td><td>value2</td><td>value3</td></tr>
    <tr><td>value1</td><td>value2</td><td>value3</td></tr>
    <tr><td>value1</td><td>value2</td><td>value3</td></tr>
    <tr><td>value1</td><td>value2</td><td>value3</td></tr>
    //so on
    </table>
    </div>
    </td></tr>
    </table>
    Raghav

  • How to start midi event playing from the middle of event?

    I'm not sure if my post title is correct but...
    I have a two minute piece of music with various instruments playing.  There are some strings that play the same couple of notes throughout.
    At the moment I am working on a middle section but as I loop, the srings aren't triggered - I have to play from the start (before the event starts).  I did not have a problem with Cubase but I can't find a way to do this in Logic.
    It's probaly quit simple though?

    This typically means the midi notes themselves start before the beginning of the loop point you have choosen
    You can quantize or manually move the first notes so that they start at the beginning of the loop and not just before... to resolve this..
    Select the regions and then check the event list for the region to confirm this is what is going on...

  • Horizontal stripe in the middle of my Powerbook 17'' screen

    Hello to you all, Powerbook users with vertical stripes on the screen!
    A few weeks ago, a horizontal stripe appeared on the screen of my 2 years old Powerbook17".
    Almost useless to mention that the serial number begins mit W85... With a slight pressure of my thumb on the left side of the screen, the stripe disappeared but after a couple of days it appeared again and now persists. Until now I never had problems with LCD on Mac ( not even with my first LCD screen connected to a Powermac G3 ) and I'm ( still ) a convinced Apple fan, lucky ( well, almost ) owner of three Macs. I wonder why a serious company like Apple take so few care of its customers, when the problem is evidently caused by fake manufacturing.
    Has anybody already tried to call the customer service in the USA?
    Why don't local stores offer assistance for their customers?
    I'm really disappointed. Best regards Acanto
    Powerbook G4   Mac OS X (10.4.10)  

    Just a 'misery loves company' reply. I bought two 17" PB back in Mar '06 after our house was robbed and our laptops stolen. One for me. One for my son. Mine just had the inverter replaced because the screen went dark. OK. I've had Macs since the Mac 512k + and never had one problem. Annoying, but not a bad track record.
    Now, this week, my son's PB is starting the line in the display. Does this scream "There's an issue here!"? I shelled out $322.60 for mine, but am loathe to do the same for the second.
    BTW, the service at the Apple Store was superb and the turn-a-round time for the repair outstanding. I think Apple should pay for my second one, though.

  • My ipod stops scrolling in the middle of my screen

    Hey, i just got a new ipod touch today and when i was scrolling trough my music i noticed that i can't scroll neither touch the letter's J and K,
    so I find this very strange and annoying, because of the fact its a brand new ipod.
    greets DrBurpy

    Try:
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes
    - Restore to factory settings/new iOS device.                       
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
      Apple Retail Store - Genius Bar                                              

  • Designjet 111 doesn't start prinring or stops in the middle

    hi,
    I recently bought a designjet 111. The first page I printed (linedrawings) came out perfectly, the second page I tried (linedrawings + some small pictures) the printer didn't start anymore.
    Now I have  the same problem: the printer just doesn't  start. I tried turning on and off my laptop and printer, changed USB-ports, turned off the 'off line' sign,... nothing seems to work.
    Then all of a sudden it started printing (don't know what i did differently), but stopped after 5 centimeters, rolled of the page and cut it off. I tried again and then it printed 30 centimeters and stopped. Now it doesn't print at all anymore.
    What can I do?
    This question was solved.
    View Solution.

    This forum is focused on consumer level products.  For the Designjet you may have better results posting in the HP Enterprise Designjet forum here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Can I start playing encrypted content in the middle?

    I have encrypted several contents using the methods SDK provided. But when I start playing the encrypted content(in f4v and flv format both), I found a problem. That is I can only play the video from the very beginning.Is there a way to play whatever part I want?

    Thank you almost, I am confused that how can I seek the playing video with my browser like youtube. I found that I can only play the downloaded part and I must wait the browser to download the video slowly, Is there a way to solve that problem? Maybe it likes that when I seek a moment to play, then the browser send a new request to the server, and start to download from that moment.
    Thanks.

  • Why does my cursor not automatically select the entire word when I try to select text by starting/ending in the middle of a word?

    In any other browser I've used (or word processor, for that matter) when I select text using my mouse cursor, if I start and/or end in the middle of a word, it automatically selects the whole word when I'm selecting more than one word. But for some reason this is not happening in Firefox. If I try to select say 3 words, and I start in the middle of the first word and end in the middle of the last word, it will only select those parts, not all 3 words entirely.

    Firefox allows to select part of a word. You can select a word with a double click and use Shift + left click to set the end of the selection, so you need to click at the end of the last word instead of in it.

  • When i zoom in google chrome, the paragraphs are resized to adjust without horizontal scroll. can this be done in safari?

    when i zoom in a website while viewing in chrome, there is less chance of the horizontal scroll. but the same page in safari leads to lot of horizontal scroll.
    vertical scrolling is ok while reading, but not both.

    yeah smart zoom is definelty good, thanks for the quick response, i feel home by getting such quick response.
    but may be few cases i felt chrome has done some good tweeks while zooming the paragraph. may be when i find specific pages i will post them.
    actually i like safari, but previous favorite was chrome. so wanted to get some best things from there.

  • Registering The iPhone 3G HELP! Horizontal Scroll Bar!

    iTunes tells me that i have to regiser my iPhone3G, so i do and i get to the iPhone Software License Agreement.. i scroll to the bottom and it only gives me three things to click. a box (The Box that states "I have read and agree..."), another box that says Cancel, and another that says Save. Obviously, a button is missing, and it is on the far right, but iTunes somehow, does not stretch that far!!! it doesn't make sense, but it doesn't have a horizontal Scroll Bar (THE BAR THAT MOVES THE SCREEN LEFT TO RIGHT). please help. i've uninstalled and reinstalled iTunes 7.7 twice already. and there's still no horizontal scroll bar!
    i heard i have to change the screen resolution... will that work??

    I am having the same issue. Went to the Apple Store in Boston and the Genius Bar escalated the problem to the Engineers and they could not even solve it. They needed me to send them an image of the issue. I went to another Apple store and the Genius there had much better problem solving skills. He used his own critical thinking and discovered that the horizontal scroll bar sits at the same height. The height is exactly where the split keyboard ends. If you take screen shots and compare...you will find they are all at the same height. He thinks since the keyboard is a new feature they havent worked out the problems yet...and we will have to wait for the update.
    Ever since Steve Jobs has been gone the call to response for issues is getting increasing slower and slower. New products continue to roll out but they all have problems and bugs. Take Maps for instance...they still have not fixed all the issues (even with this 6.0.1 update). The Ipad mini I spend 700$ for and it is such a faulty product. For what I spent I would have thought I would have gotten a great product. I have all Apple products...phone, desktop, laptop, Ipad original, and Mini...but they have done me wrong over and over. It may take months for them to roll out the fix the way the compnay has been operating under Cook.
    When will the fix come....I do not know... best of luck!

Maybe you are looking for

  • Select Query failing on a  table that has per sec heavy insertions.

    Hi Problem statement 1- We are using 11g as an database. 2- We have a table that is partitioned on the date as range partition. 3- The insertion of data is very high.i.e. several hundreds records per sec. in the current partitioned. 4- The data is co

  • Using CAN bus to transport and play the stream audio data

    hello, Just want to build a PC-Based control network using CAN bus (Ethernet not considered).The system is separated two parts , one is the front unit(FU), and the other is the centeral unit(CU). FU performs dialing-up number to the CU , and play the

  • Increase the line size in ABAP Editor

    Hai experts, I write  ABAP code  one  line upto 73 charcters only in ABAP editor, how to increase the line size in ABAP editor. please its urgent. thanks and regards sitaram

  • How to know business process related to fico

    Hi , Basically i am abaper , till now i handled tasks related to mm and sd. But recently i am working on FICO module, as this is new to me . please kindly suggest me how to know the business process related to fico. The terminology is also looking di

  • EL problem in uix page

    Hi, I have a request parameter which I would like display content. It's a list which content another list. I write this: <stackLayout> <contents childData="${requestScope.treeSecteurMarque}"> <styledText text="${uix.current.nomSecteur}" /> <stackLayo