Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Nov 2005
    Posts
    2
    Member #
    11776
    I am setting up a web site that uses information in an external xml file to display a number of images in a table. I can set it up so that each row has and image but I would like for each row to contain three colums. So it would look like this...

    1 2 3
    4 5 6

    instead of

    1
    2
    3

    Is there a relatively easy way of acomplishing this?

  2.  

  3. #2
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    i am assumeing you are useing table code so try this
    HTML Code:
    <table>
    <tr>
    <td>
    &nbsp;
    </td>
    <td>
    &nbsp;
    </td>
    <td>&nbsp;
    </td>
    </tr>
    <tr>
    <td>
    &nbsp;
    </td>
    <td>
    &nbsp;
    </td>
    <td>&nbsp;
    </td>
    </tr>
    </table>
    Thee Pyro Wolf

  4. #3
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    There are a few ways of doing this. Probably the easiest would be to nest the images in <div> elements and use CSS to display them appropriately.

    I have to ask you, though, why are you using an XML island? Last I checked, such functionality only worked well in IE, and with the requirement of the MSXML ActiveX object. In other words, if anyone has their security settings set tight (smart), they won't see your data islands.

    Have you considered using XSL-T or DOM instead with a server-side script?

  5. #4
    Junior Member
    Join Date
    Nov 2005
    Posts
    2
    Member #
    11776
    Specific Code

    The website is going to be part of an intranet so I have control over the browser and security controls. I am not too familiar with server side scripting so... Here is the code I have now. The intent is to make it easy for some unskilled person to update the xml data and not have to venture into any HTML coding or resorting the tables since we display the records alphabetically.

    <html>
    <body>

    <xml id="sites" src="sites.xml" async="false"></xml>

    <table width="800" border="1" cellspacing="0" cellpadding="5" datasrc="#sites">

    <td><IMG DATAFLD="image"></IMG></td>
    </tr>
    </table>


    </body>
    </html>

    -------------------------------
    with the XML looking like this:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- Edited with XML Spy v4.2 -->
    <SITES>
    <SITE>
    <IMAGE>img/a4.gif</IMAGE>
    <NAME>A4 Health Systems</NAME>
    <ADDRESS>http://www.a4healthsystems.com</ADDRESS>
    </SITE>

    <SITE>
    <IMAGE>img/aetna.gif</IMAGE>
    <NAME>Aetna</NAME>
    <ADDRESS>http://www.aetna.com</ADDRESS>
    </SITE>
    </SITES>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:38 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com