Can a link only change one cell in a table?

I've been learning Dreamweaver from a textbook, but I'm still pretty new to it, and I'm not sure what terminology to use here.  I want my site to have a link that just changes one cell in a table when you click the link, rather than having it go to a whole new page.  For example, you click a link and a picture changes but the rest of the site stays the same.  So far, I've been doing this by just making several duplicates of an html file, and then just changing that one cell in each copy.  It works, more or less, but then whenever I want to make a change to my page, I have to make the same change in all the copies.  There's got to be a better way, right?
If this is too complicated to explain in a forum, perhaps someone could just tell me if there's a term for what I'm trying to do, and then I can just look for it in my book or search for it online.
Thanks for your help.  Oh, and the version I'm using is CS5.

What you are asking for is called a 'disjoint rollover', which means 'something happens over here, and the effect is seen over there'. It's simple to do even manually. Take a look at this page -
http://www.murraytestsite.com/locrian.html
The code on the page is this -
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
</head>
<body>
<p><a href="#" onclick="document.getElementById('image').src='_img/masthead-logo1.jpg'">link</a></p>
<table width="347" border="1">
  <tr>
    <td>  </td>
    <td>  </td>
    <td>  </td>
  </tr>
  <tr>
    <td>  </td>
    <td>  <img src="_img/masthead-logo.jpg" width="347" height="120" alt="" id="image"/></td>
    <td>  </td>
  </tr>
  <tr>
    <td>  </td>
    <td>  </td>
    <td>  </td>
  </tr>
</table>
</body>
</html>
I used a table because you specifically asked about tables, but I wouldn't recommend using them for anything other than tabular data, and certainly not for general layout. The code could be re-written like this to completely eliminate the table -
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
</head>
<body>
<p><a href="#" onclick="document.getElementById('image').src='_img/masthead-logo1.jpg'">link</a></p>
<div><p><img src="_img/masthead-logo.jpg" width="347" height="120" alt="" id="image"/></p></div>
</body>
</html>
Better, huh?

Similar Messages

  • How to change one cell's backColour in DataGird.

    how to change one cell's backColour in DataGird.who can tell
    me how to do?Thangks

    Hi,
    You may need to use custom skin for that.
    -Arun

  • Error while deleting Cash Journal (Numbering group 1001 can be used only for one CoCd and cash journal number)

    Hi,
        While i am try to delete Cash Journal system throws me error (Message No.:FCJ065: Numbering group 1001 can be used only for one Co. Code  and Cash Journal). Kindly provide me solution on that.
    Regards,
    Tarak

    Hi Tarak,
    You can use the config nodes in SPRO to set up number ranges for your cash journal documents.
    IMG Path> FI Global Settings>Bank Accounting>Business transactions>Cash Journal
    Define Number Range Intervals for cash Journal documents
    Define Numbering Groups
    Define Number Ranges for numbering groups
    After defining the number group here, you assign that in "Set up Cash Journal" Check if there is any clash anywhere in your configuration for different cash Journals.
    Regards,
    Kavita

  • HT3702 Is there any limit to the number of itunes account that can be linked to the one credit card?

    Hi.  Does anyone know if there is a limit to the number of itunes accounts that can be linked to the one credit card? 
    Thanks,
    Nelliemay

    Craig,
    It was image.cpp line 2770.  I am told (by another person in the company that has seen this) that it has been seen on several machines, always PXI controllers, but not on all PXI controllers.  I am told that it is not always image.cpp that reports the error, but for me it was always the same line of code identified by the error message.  I did not have a chance to do any experimenting to find a particular threshold number of mnu files.  I may be able to find error logs.  I currently sent the controller to our IT department, doing a windows XP repair, just in case there was something corrupted in the system itself.
    The error was reproducible.  This installation at one time must have included real-time / FPGA, because on the opening screen I ge the drop-down ring for selecting a target.  If I click on this drop down ring, I get the crash on line 2770, every time.  If, instead I open an empty new VI, I am able to switch to the block diagram by selecting the window directly with the mouse, but if I try to pull down on the "window" menu to do "show block diagram", I get the crash on line 2770, every time.  Because the user-defined mnu files are now deleted, I would have to create them again, or find a way to reinstall them, to reproduce the error at this point.
    Vinny

  • [svn:bz-trunk] 20754: My latest EndpointPushNotifier change changed the style of the code quite a bit  (sorry for that, it was my IDE settings getting in the loop here) I only changed one char line 389.

    Revision: 20754
    Revision: 20754
    Author:   [email protected]
    Date:     2011-03-10 03:36:05 -0800 (Thu, 10 Mar 2011)
    Log Message:
    My latest EndpointPushNotifier change changed the style of the code quite a bit (sorry for that, it was my IDE settings getting in the loop here) I only changed one char line 389.
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/client/EndpointPushNotifier.java

    I seem to have fixed it by putting <div  class="clearfloat"></div> after the navigation bar?

  • Numbering Group G1 can be used only for one CoCd and cash journal number

    Hello,
    I was trying to create a cash journal when I got the error message:
    "Numbering Group G1 can be used only for one CoCd and cash journal number".
    Does anyone have an idea what could be wrong?
    Thank you,
    Bola

    Hi,
    Please check whether more than one number range is maintained in  transaction code FBCJC1. If yes, please keep only one as Cash Journal has only one number range. This is the internal number range for Cash Journal.
    If you want different number range for accounting documents then create new document types and assign number ranges to it.
    Regards,
    Tejas

  • I'm wanting to migrate certain applications from my MacBook Pro over to my newer Mini, but Migration Assistant doesn't allow doing this by choosing which applications to migrate-how can I pick only certain ones?

    I'm wanting to migrate certain applications from my MacBook Pro over to my newer Mini, but Migration Assistant doesn't allow doing this by choosing which applications to migrate-how can I pick only certain ones?

    You only bought it four months ago, so it's still under warrantly.
    Call Applecare or call your nearest Applestore to make an appointment. Tell them your mac has serious technical issues, describe them shortly.

  • Adding JUST ONE CELL to a table within Pages

    Hello,
    I would like to add +just one cell+ to a table within "Pages" - but as far as I can see the program only offers to add whole lines or columns. (Within "MS Word", you have the possibility to "add cells" in a table - you can decide whether you want to shift the other cells downward or to the right.)
    Do I miss something?
    Thanks for your help.
    nb.

    Maybe I should have said: Is there a function within Pages that is equivalent to the (very useful) one within Word. There isn't, I'm afraid.
    Can I adjust only the size of one cell (with the mouse, by clicking on the vertical/horizontal line) without changing the size of the whole column/line? I guess that it should be working - I didn't manage to do it - might be kind of tricky.
    As I said: Thank you!
    All the best,
    nb.

  • F4 help for only a single cell in a table

    Dear All,
    The requirement here is to provide input help for only a particular cell in a table.
    This cannot be achieved by assigning search help to the attribute of the context as this will render all the cells of that particular column with F4 help. I tried applying the cell variant concept but only go up to a certain extent.
    I tried OVS as well. But for this to work we need to lead select the entry and then go ahead with F4, which will make is inconvenient for the user.
    I even searched the forum for some answers, but i could only go to a certain extent with the help of those.
    So, if anyone out there has any idea, please help me out. Also, if this is a repeat post by any chance (i think not) kindly provide me with the link of the original.
    Thanks and Best Regards,
    Pramod

    I am running older versions, so i didn't find any sample dynpros..
    You can try with this peace of code..nyways..
    DATA: LR_TABLE TYPE REF TO CL_WD_TABLE.
    DATA: LR_COLUMNS TYPE CL_WD_table_column=>tt_table_column.
    DATA: LR_COLUMN TYPE REF TO CL_WD_TABLE_COLUMN.
    DATA: LR_EDITOR TYPE REF TO CL_WD_VIEW_ELEMENT.
    DATA: LR_TEXT   TYPE REF TO CL_WD_TEXT_VIEW.
    DATA: BINDING TYPE STRING.
    DATA: LR_CELL TYPE REF TO CL_WD_TABLE_STANDARD_CELL.
    IF FIRST_TIME EQ ABAP_TRUE.
      LR_TABLE ?= VIEW->GET_ELEMENT( 'TBL_COMPONENTS' ).
      LR_COLUMNS = LR_TABLE->GET_COLUMNS( ).
      LOOP AT LR_COLUMNS INTO LR_COLUMN.
        LR_EDITOR ?= LR_COLUMN->GET_TABLE_CELL_EDITOR( ).
        BINDING = LR_EDITOR->BOUND__PRIMARY_PROPERTY( ).
        IF BINDING EQ 'RRSO.SOCOMP.POSNR' OR
           BINDING EQ 'RRSO.SOCOMP.MATNR' OR
           BINDING EQ 'RRSO.SOCOMP.KWMENG' OR
           BINDING EQ 'RRSO.SOCOMP.NETPR' OR
           BINDING EQ 'RRSO.SOCOMP.POPRICE' OR
           BINDING EQ 'RRSO.SOCOMP.QUANTITY'.
           LR_CELL = CL_WD_TABLE_STANDARD_CELL=>NEW_TABLE_STANDARD_CELL( VIEW = VIEW
                                VARIANT_KEY = 'TOTAL' ).
           IF BINDING EQ 'RRSO.SOCOMP.QUANTITY'.
             LR_TEXT = CL_WD_TEXT_VIEW=>NEW_TEXT_VIEW( VIEW = VIEW
                                                       TEXT = 'Total'
                                                       H_ALIGN = CL_WD_TEXT_VIEW=>E_H_ALIGN-FORCED_RIGHT ).
           ELSE.
             LR_TEXT = CL_WD_TEXT_VIEW=>NEW_TEXT_VIEW( VIEW = VIEW ).
           ENDIF.
           LR_CELL->SET_EDITOR( LR_TEXT ).
        ENDIF.
         LR_COLUMN->ADD_CELL_VARIANT( LR_CELL ).
      ENDLOOP.
    ENDIF.
    This code is for setting Text View as cell editor, instead text view u can take input field and use bind_value method to bind with another context attribute.
    Abhi

  • How do I run a video in one cell of a table when a user clicks a button in another cell?

    In other words, I want to put 3 buttons in one cell of a table so that the user can run one of three Flash videos in a cell beside the buttons. How do I do that?
    Header 1
    Header 2
    button 1 runs video 1
    button 2 runs video 2
    button 3 runs video 3
                                     video 1, 2, or 3 is inserted here when the user clicks the button

    You will have better luck if you find a Flash Player that uses a playlist.  Direct links to FLV files don't work.
    http://www.wimpyplayer.com/
    http://www.woosterwebdesign.com/flvplayer/
    http://www.longtailvideo.com/players/jw-flv-player/
    http://flowplayer.org/
    Another option is to upload your videos to YouTube.com. You can customize a YouTube player and populate it with videos you specify.  Then paste their player embed code into your web page.
    http://code.google.com/apis/youtube/getting_started.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Can you write vertically in the cell of a table, can you write vertically in the cell of a table

    can you write vertically in the cell of a table, can you write vertical

    If you don't understand that my response was a smiling echo of the stammering question I really can't help you.
    I guess that my 36725 points prove that I may be helpful. It seems that at this time you don't really know what are helpful answers.
    Using spreadsheets since more than twenty years, I know that storing something in an auxiliary object floating upon a cell isn't a serious workaround to the asked question. We may be sure that more or less soon, the object will no longer be were it was supposed to be.
    At this time, if we want to put a vertical text in a cell it's safer to insert a character, a linefeed, a character, a linefeed … which, one more time is echoing the stammering question.
    Yvan KOENIG (VALLAURIS, France) vendredi 29 avril 2011 14:37:08
    Please :
    Search for questions similar to your own before submitting them to the community

  • Changing background color in JTable, only changes one row at a time...

    I'm trying to change the color of rows when the 5th column meets certain criteria. I think I'm very close, but I've hit a wall.
    What's happening is the row will change color as intended when the text in the 5th column is "KEY WORD", but when I type "KEY WORD" in a different column it will set the first row back to the regular colors. I can easily see why it's doing this, everytime something is changed it rerenders every cell, and the listener only checks the cell that was just changed if it met the "KEY WORD" condition, so it sets every cell (including the previous row that still meets the condition) to the normal colors. I can't come up with a good approach to changing the color for ALL rows that meet the condition. Any help would be appreciated.
    In this part of the CellRenderer:
            if (isSelected)
                color = Color.red;
            else
                color = Color.blue;
            if (hasFocus)
                color = Color.yellow;
            //row that meets special conditions
            if(row == specRow && col == specCol)
                color = color.white; I was thinking an approach would be to set them to their current color except for the one that meets special conditions, but the two problems with that are I can't figure out how to getColor() from the table, and I'm not sure how I would initially set the colors.
    Here's the rest of the relevant code:
        public void tableChanged(TableModelEvent e)
            int firstRow = e.getFirstRow();
            int lastRow  = e.getLastRow();
            int colIndex = e.getColumn();
            if(colIndex == 4)
                String value = (String)centerTable.getValueAt(firstRow, colIndex);
                // check for our special selection criteria
                if(value.equals("KEY WORD"))
                    for(int j = 0; j < centerTable.getColumnCount(); j++)
                        CellRenderer renderer =
                            (CellRenderer)centerTable.getCellRenderer(firstRow, j);
                        renderer.setSpecialSelection(firstRow, j);
    import javax.swing.table.*;
    import javax.swing.*;
    import java.awt.Component;
    import java.awt.Color;
    public class CellRenderer extends DefaultTableCellRenderer
        int specRow, specCol;
        public CellRenderer()
            specRow = -1;
            specCol = -1;
        public Component getTableCellRendererComponent(JTable table,
                                                       Object value,
                                                       boolean isSelected,
                                                       boolean hasFocus,
                                                       int row, int col)
            setHorizontalAlignment(JLabel.CENTER);
            Color color = Color.green;
            if (isSelected)
                color = Color.red;
            else
                color = Color.blue;
            if (hasFocus)
                color = Color.yellow;
            if(row == specRow && col == specCol)
                color = color.white;
            //setForeground(color);
            setBackground(color);
            setText((String)value);
            return this;
        public void setSpecialSelection(int row, int col)
            specRow = row;
            specCol = col;
    }If I'm still stuck and more of my code is needed, I'll put together a smaller program that will isolate the problem tomorrow.

    That worked perfectly for what I was trying to do, but I've run into another problem. I'd like to change the row height when the conditions are met. What I discovered is that this creates an infinite loop since the resizing triggers the renderer, which resizes the row again, etc,. What would be the proper way to do this?
    Here's the modified code from the program given in the link. All I did was declare the table for the class, and modify the if so I could add the "table.setRowHeight(row, 30);" line.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.border.*;
    public class TableRowRenderingTip extends JPanel
        JTable table;
        public TableRowRenderingTip()
            Object[] columnNames = {"Type", "Company", "Shares", "Price", "Boolean"};
            Object[][] data =
                {"Buy", "IBM", new Integer(1000), new Double(80.5), Boolean.TRUE},
                {"Sell", "Dell", new Integer(2000), new Double(6.25), Boolean.FALSE},
                {"Short Sell", "Apple", new Integer(3000), new Double(7.35), Boolean.TRUE},
                {"Buy", "MicroSoft", new Integer(4000), new Double(27.50), Boolean.FALSE},
                {"Short Sell", "Cisco", new Integer(5000), new Double(20), Boolean.TRUE}
            DefaultTableModel model = new DefaultTableModel(data, columnNames)
                public Class getColumnClass(int column)
                    return getValueAt(0, column).getClass();
            JTabbedPane tabbedPane = new JTabbedPane();
            tabbedPane.addTab("Alternating", createAlternating(model));
            tabbedPane.addTab("Border", createBorder(model));
            tabbedPane.addTab("Data", createData(model));
            add( tabbedPane );
        private JComponent createAlternating(DefaultTableModel model)
            JTable table = new JTable( model )
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    //  Alternate row color
                    if (!isRowSelected(row))
                        c.setBackground(row % 2 == 0 ? getBackground() : Color.LIGHT_GRAY);
                    return c;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.changeSelection(0, 0, false, false);
            return new JScrollPane( table );
        private JComponent createBorder(DefaultTableModel model)
            JTable table = new JTable( model )
                private Border outside = new MatteBorder(1, 0, 1, 0, Color.RED);
                private Border inside = new EmptyBorder(0, 1, 0, 1);
                private Border highlight = new CompoundBorder(outside, inside);
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    JComponent jc = (JComponent)c;
                    // Add a border to the selected row
                    if (isRowSelected(row))
                        jc.setBorder( highlight );
                    return c;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.changeSelection(0, 0, false, false);
            return new JScrollPane( table );
        public JComponent createData(DefaultTableModel model)
            table = new JTable( model )
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    //  Color row based on a cell value
                    if (!isRowSelected(row))
                        c.setBackground(getBackground());
                        String type = (String)getModel().getValueAt(row, 0);
                        if ("Buy".equals(type)) {
                            table.setRowHeight(row, 30);
                            c.setBackground(Color.GREEN);
                        if ("Sell".equals(type)) c.setBackground(Color.YELLOW);
                    return c;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.changeSelection(0, 0, false, false);
            return new JScrollPane( table );
        public static void main(String[] args)
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
        public static void createAndShowGUI()
            JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame frame = new JFrame("Table Row Rendering");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.add( new TableRowRenderingTip() );
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
    }Edited by: scavok on Apr 26, 2010 6:43 PM

  • Make Editable only for one cell

    Hi,
    Is it possible to make one cell editable in a non-editable column of a matrix?
    I have made a column non-editable.  Now, based on a CFL value (which is in another column) selected, i want to make that row's non-editable column as editable.
    My code, which fails:
    If objMatrix.Columns.Item("V_1").Cells.Item(pVal.Row).Specific.value = 0 Then
                objMatrix.Columns.Item("V_0").Cells.Item(pVal.Row).Specific.Enabled = True
    End If

    If is column set to non editable, you cannot allow to user change the vaule in any cell. The only way is set the column as editable and catch the events as
    If pVal.ItemUID = "matrix" And pVal.BeforeAction = True And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE (for cghanges, gotfocus for accesing) And pVal.ColUID = "col" And pVal.ItemChanged = True Then
    which will catch the changes of cell and if the cell isnt enabled for changes, set bubleevent to true.

  • Activate only one cell in the table column

    Hi experts,
      I am facing a problem where in i need to allow only one cell for input in the complete table.
      Suppose i have 4 rows and 5 columns, and i want to allow only one field for input in the complete table based on a condition.
    Can someone help me how to achieve this?
    Regards,
    Madhu

    hi madhu,
           what you ca do is, have an extra attribute  in the node that is bound o the table, this attribute must be bound to the read only property of the cell. so according to your condition fill the attribute with 'X' or no value so that it will be in read only or editable mode.
    ---regards,
       alex b justin

  • Applying  a change to a selection in Aperture only changes one image

    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information below at your own discretion.
    If you are attempting to apply a change to a selection of images but the change only effects one of the images there are a couple of possibilities:
    # You have Primary Only selected. This setting is found at the lower right hand conner of the main window. It is the middle icon with the 1 on it.
    # You are attempting to apply a rating, color label or flag from the Metadata pane of the Inspector. Regardless of the state of the Primary Only button if you set these adjustments from the Metadata pane then only the primary selection is modified. To apply a rating, color label or flag to a selection use the keyboard shortcuts or the *Metadata-> commands*.
    This is the 1st version of this tip. It was submitted on February 8, 2011 by Frank Caggiano.
    Do you want to provide feedback on this User Contributed Tip or contribute your own? If you have achieved Level 2 status, visit the User Tips Library Contributions forum for more information.

    This tip is ready for consideration and inclusion into the *Aperture Installation, Setup and General Usage* forum.
    thanks

Maybe you are looking for

  • Parametrized BIP report integration on OBIEE 11g dashboard

    HI Experts, I have created BIP Report using SQL as source for my Dataset in Datamodel.Also, the report is parametrized with date value. SELECT * FORM EMP WHERE DEPT_NO=:DEPT_NO AND HIRE_DATE<=:FROMDATE AND HIRE_DATE>=:TODATE DEPTNO : List of value (S

  • Fraudulent calls on my account. Need refund of $12...

    Hello, I have a Skype account (mosaicsteph) that I have not used in 6 months. I have a credit card on file and when my account is below 50 cents it automatically adds funds back to the account. On November 11, 2012 my account was accessed by an unkno

  • HELP! I ERASED MY PROJECT

    I just got visual studio, and I've been working on it for a couple weeks, my project was acting weird, it seemed to be working the same regardless of what I changed in the code, so just to test it, I deleted all of my code and pressed start, it acted

  • Funkiest thing I"ve ever seen in iMail!!!!

    SO my wife is on her macbook using iMail and it suddenly closes on her. It gives her the standard " do you want to close/ reopen " option so she clicks "reopen". A minute or so later imail reopens, but she has all MY EMAILS from MY EMAIL account. She

  • Aperture/Photoshop Color Control Issues

    I am photographer that has been doing the unthinkable for the past four years – I use the Finder to scroll through pictures I’ve taken and load them one-by-one into Photoshop CS4 for editing. I know this is dumb, and I really want to change my workfl