tabel inside the div

Last post 04-11-2008 12:02 PM by ClayCo. 1 replies.

Sort Posts:

  • tabel inside the div

    04-10-2008, 11:26 PM
    • Loading...
    • karang
    • Joined on 04-20-2007, 11:57 AM
    • Gurgaon, India
    • Posts 218

    Hi

     

    I am writing the following code

    <table border = "1" style = "border-color : #2E37FE; border-width : medium;" cellspacing="0" cellpadding="0">

    <tr>

    <td>

    <div id = "MainWindow">

    <table width = "100%" border = "1" style = "border-color:Green;">

    <tr style="height : 10%;">

    <td>

    <div id = "TitleWindow">

    </div>

    </td>

    </tr>

    <tr style="height : 90%;">

    <td>

    <div>

     

    </div>

    </td>

    </tr>

    </table>

    </div>

    </td>

    </tr>

    </table>

     

    in which I have defined table inside the div tag. But I am not able to see the table that is inside the div.

    I have defined the silverlight object which reference the div tag "MainWindow".

    Silverlight.createObjectEx(

    {

    // NAME OF THE SOURCE XAML FILE

    source : xaml\PaintBurshMain.xaml,

    // NAME OF THE CONTAINER WHERE CONTENTS WILL BE PLACED

    parentElement : document.getElementById('MainWindow'),

    // PROPERTIES OF THE CONTAINER TAG

    properties :

    {

    width : 1000,

    height : 1000,

    background :
    '#FFFFFF',

    isWindowless : 'true',

    framerate : '24',

    version : '0.90.0',

    border : '3'

     

    },

    // EVENTS ON THE CONTAINER

    events :

    {

    onError :
    null,

    onLoad : null

    }

    }

    );

     

    Why the table inside the div is not showing

     

    Regards

     

    Karan

    For .net,Javascript and Sql server articles and interview question visit


    http://guptakaran21.googlepages.com/mainpage
  • Re: tabel inside the div

    04-11-2008, 12:02 PM
    Answer
    • Loading...
    • ClayCo
    • Joined on 06-14-2002, 10:11 AM
    • United States
    • Posts 251
    • AspNetTeam

    Hi Karan,

    Silverlight.createObjectEx() overwrites the inner HTML of whatever element you specify to be the parent element, so the inner table you described is completely replaced when the call to that function is made.  If you don't want the HTML for the table to be overwritten, you should consider changing the parent element to another element on the page (like, for example, TitleElement).

    HTH,
    Clay

Page 1 of 1 (2 items)