473,471 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Add Row Dynamic with Styles

3 New Member
Hi I have a problem. I did this function to add a row dynamic but, I don't know how to add style, like aling="left". This is my funcion:
function addRow()
{
var i;
var myIDS = ['txtCodigo','txtDescripcion','txtCantidad'];
var newRow = document.all("grdPedido").insertRow();
if(frmPedido.txtCantidad.value > 0)
{
for(i=0;i<myIDS.length;i++)
{
var oCell = newRow.insertCell();
oCell.innerHTML = document.getElementById(myIDS[i]).value;
}
oCell = newRow.insertCell();
oCell.innerHTML = "<input type='button' value='Eliminar' click='removeRow(this);'/ id='button'1 name='button'1>";
}
}
Sep 11 '06 #1
2 2486
drhowarddrfine
7,435 Recognized Expert Expert
If you are asking how to add style inline then it would be style="align:right; color:red;" etc. Forgot how to do it in js.
Sep 11 '06 #2
Delerna
1,134 Recognized Expert Top Contributor
oCell.setAttribute('align','right');
Jan 16 '08 #3

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

Similar topics

2
by: Tommy Lang | last post by:
Hi everybody! I am trying to learn the basics of C++ myself and have a hard time understanding some stuff like pointers and references etc. I have created a small program that adds two numbers...
0
by: Martin Buchleitner | last post by:
Hi ! At the moment i split the document into seperate NodeSets which consist of one 'style1' block. This block goes either until the end of the document or until another 'style1' block appears....
11
by: Robert Bowen | last post by:
Hello all. I have been given mock-ups (in static HTML) of some pages for a site I am working on. The client would like these pages to look exactly as they do now. The problem is that the content is...
1
by: Ric Castagna | last post by:
Greetings from Snowy Charlotte... I am trying to create a dynamic web site that will be "skinned" based upon an authenticated user's information. This skinning could be extensive (entire change...
4
by: kj | last post by:
I have a dynamically generated HTML document that includes a table of numbers. In this table, I want every number greater than some numerical parameter MAX_VAL (also dynamically generated) to be...
3
by: brian.turner | last post by:
This is sort of a design/javascript question. It involves CSS rendering in dynamic areas of a page using IE. E 6 & 7 HI There, We've created some example static html pages (using CSS) that...
1
by: erictomlinson | last post by:
I'm dying here trying to figure this out for days. Here's the scenario: 1) External script.as file dynamically imported to loader.swf file that creates a textfield (createTextField) 2)...
4
by: coconet | last post by:
Server is Win2K3/IIS6. I have an ASPX page with this in the <headtag: <link rel="stylesheet" type="text/css" href="<% Response.Write( "http://" + Request.ServerVariables.ToString() +...
4
by: henry | last post by:
Folks: Using Dreamweaver CS3... Consider a home page, "index.php" which conditionally REQUIREs one of 'N' HTML files of pure content. All site styles are specified in a master CSS file,...
2
Frinavale
by: Frinavale | last post by:
I've created a ASP.NET control that displays a "book" of schedules. It dynamically displays scheduling times and allows the user to page through the schedules. It also lets the user edit the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.