473,382 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How create colspan at runtime in javascript

Expand|Select|Wrap|Line Numbers
  1. var row2 = x.insertRow();
  2. var x1=row2.insertCell(0);
  3. var y1=row2.insertCell(1);
  4. y2=row2.insertCell(2);
  5. y3=row2.insertCell(3);
  6. y4=row2.insertCell(4);
  7. //y5=row2.insertCell(5);
  8.  
  9. a.innerHTML = "&nbsp;&nbsp;<img align='middle' src='" + mypath + "/image/lpn.gif'>";
  10. //b.innerHTML = "<div align='right'>"+(i+1)+"</div>";
  11. b.innerHTML ="&nbsp;&nbsp;"+ createRules(stgto.name,stgto.strategyId,i+2);
  12.  
  13. c.innerHTML = stgto.description;
  14. d.innerHTML = stgto.meaning;
  15. e.innerHTML = stgto.userDefinedFlag;
  16.  
  17. x1.innerHTML ="";
  18. y1.innerHTML ="<div id='ids"+(i+2)+"'></div>";
  19. y2.innerHTML ="";
  20. y3.innerHTML ="";
  21. y4.innerHTML ="";
  22. //y5.innerHTML ="";
i want to colspan y1 to y4 in row2 rows . is it possible in javascript ?
Jul 27 '07 #1
1 4896
pbmods
5,821 Expert 4TB
Heya, somusofthand. Welcome to TSDN!

You might be able to use element.setAttribute():

Expand|Select|Wrap|Line Numbers
  1. y1.setAttribute('colspan', '2');
  2.  
Jul 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: YB | last post by:
I have a table that looks as it should in mozilla, but not in IE. I couldn't find something obviously wrong with it: Here is the url:...
19
by: Logix | last post by:
Hello! I'm trying to make a sort of online page building system. In order to do this, I represent my page using a HTML table. One of the most basic templates would be a page divided in six...
16
by: datactrl | last post by:
Hi, Is that posible to create a web page completely with javascript and open it without request to server? Please show a simple sample. Thanks in advance! Jack
13
by: Geoff Cox | last post by:
Hello, How do I create a form without using document.write() which opens a new window? I imagine it has to do with using a <SPAN ID='idvalue' etc element and...
8
by: william_dean | last post by:
Hello, I've done some searching around the post, and I have found quite a bit of information related to the setAttribute and it's related uses. My problem lies in the usage of colspanning in dynamic...
3
by: bluez | last post by:
I want to design a webpage where user can search the data from the database and list out the related records. Each of the record got a delete button which allow user to delete the record. ...
6
by: davibugi | last post by:
Hi people please help me out with this code cant find any person who has done it before. I want my calculations to be done without posting to another page. On change on the entered amount the...
2
by: vsanjit | last post by:
Hi all, I've been trying to create a table dynamically upon the generation of en event using the appendChild method in Javascript. This seems to work fine in Firefox, but not in IE7. There's also...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.