moving table columns

Posted on 2008-10-06
Last Modified: 2009-12-21
a table with prev and next to move the columns.
when i do prev and next i want the first columns (blue) not to move and remain visible all the time.
i dont want to split it into 2 tables.
pl help.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">/* <![CDATA[ */
#theTable {
  width: 1700px;
#theTable td {
  width: 170px;
/* ]]> */</style>
<script type="text/javascript">/* <![CDATA[ */
  window.$id=function(s){return document.getElementById(s)}
var horzTableScroll = {
  colWidth: 170,
    if(!document.createTextNode) return;
    var controls = $id('controls');
    var link = document.createElement('a');
    var link2=link.cloneNode(false);
    controls.appendChild(document.createTextNode(' '));
    link.onclick=function(){return horzTableScroll.scroll(-1)};
    link2.onclick=function(){return horzTableScroll.scroll(1)};
    var scroller = $id('scroller');'850px';'hidden';
    var par = $id('scroller');
    var newNum = par.scrollLeft + dir*horzTableScroll.colWidth;
    if((newNum>=0) && (newNum <= $id('theTable').offsetWidth-par.clientWidth))
      par.scrollLeft = newNum;
    return false;
window.onload = function(){
/* ]]> */</script>
<div id="controls"></div><br/>
<div id="scroller">
<table id="theTable" cellspacing="0" cellpadding="2" border="1">
    <td bgcolor="blue">1</td>
    <td bgcolor="blue">2</td>
    <td bgcolor="blue">3</td>
    <td bgcolor="blue">4</td>
    <td bgcolor="blue">5</td>
    <td colspan="2">sfdsf</td>
    <td bgcolor="blue">6</td>
    <td colspan="2">fsdfsd</td>
    <td colspan="3">fsfsd</td>  

Open in new window

Question by:vidhubala
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 44

Accepted Solution

scrathcyboy earned 500 total points
ID: 22656317
Have you checked to see if these javascript operators even work in browsers other than IE?  I think most of the calls are IE specific, and won't work in other browsers.  But try them.

Author Comment

ID: 22656321
answer not specific to my question. thanks.

Author Comment

ID: 22673310
hi scrath,

so do u know any other way to do it? FYI it works in ie and all firefox versions..

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question