Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2005, 05:37 AM
Authorized User
 
Join Date: Jan 2005
Location: bucuresti, , Romania.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Roshu
Default Arrange dynamic cells...


    Hi,
   I created a dynamic table, witch has a form in it, every row is an input. In the first row a have the file type input, so it is formed by
the text box with the file name and the browse button.
   In the second row a have a radio button and 3 other text boxes, but the radio button it is put right under the file type text box and the other 3 text boxes are put on the same row with the radio button but starting where the browse button above it's ending.
    How do i arrange the cells to be close to eatch other?

Roshu
__________________
Roshu
 
Old January 11th, 2005, 06:55 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi Roshu,

You can use objtd.colSpan=3 if you are using (IE/Opera)
and objtd.setAttribute('colspan', 3);

Hope below code help you
<script>
function check()
{
     mainobj=document.getElementById("divid")

        mytable = document.createElement("TABLE");
        mytable.bgColor="red"
        mytablebody = document.createElement("TBODY");

         mycurrent_row=document.createElement("TR");
         mycurrent_cell=document.createElement("TD");

         filex = document.createElement('input');
      filex.setAttribute('type','file');

        mycurrent_cell.appendChild(filex)
        mycurrent_row.appendChild(mycurrent_cell)
        mycurrent_cell.colSpan="3"

       mytablebody.appendChild(mycurrent_row)
       mytable.appendChild(mytablebody)

      mytablebody = document.createElement("TBODY");
      mycurrent_row=document.createElement("TR");
      for(j=0;j<3;j++) {
                  mycurrent_cell=document.createElement("TD");
                 if(j==0)
                  inputtype="radio"
                 else
                  inputtype="text"

             objcell=document.createElement("input")
             objcell.type=inputtype
        mycurrent_cell.appendChild(objcell)
              mycurrent_row.appendChild(mycurrent_cell)
                     }
       mytablebody.appendChild(mycurrent_row)
         mytable.appendChild(mytablebody)
  mainobj.appendChild(mytable)
}
</script>
<div id="divid">
</div>

<input type=button value="CreateTable" onclick="check()">

Cheers :)

vinod




Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem understanding how to arrange the project alexanderH BOOK: ASP.NET Website Programming Problem-Design-Solution 6 January 29th, 2007 12:50 AM
can u arrange .net cds gvcc_neel .NET Framework 2.0 2 December 21st, 2004 09:17 AM
can u arrange .net cds it is emergency gvcc_neel .NET Framework 2.0 1 December 18th, 2004 01:20 PM
Entering data to dynamic table cells weebadbilly XSLT 0 June 30th, 2004 07:15 AM
how to arrange elements group wise. srini XSLT 0 February 4th, 2004 05:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.