![]() |
| ||
| Remove style with JavaScript Hey all, I am trying to remove some style from a table cell with JavaScript but it is not working as I wish it would. As you can see in the code below I am trying to remove all borders from cells that are dotted. If I use the following code, all borders will change to “medium none�. From this… style="BORDER-RIGHT: dotted; BORDER-TOP: dotted; BORDER-LEFT: dotted; BORDER-BOTTOM: dotted " To that… style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" I would like it to remove all border styles without removing any other styles if there are any. If there is a width style it would end up like this: style=�WIDTH: 100px� The code to change is commented. function SetupForHTML() Anyone can help me? TIA Mat |
| ||
| Re: Remove style with JavaScript I won't need to use this anymore now so thx anyway if you wanted to help. |
| ||
| Re: Remove style with JavaScript You just set the style to whatever property you would like, for example "border=0". |
| ||
| Re: Remove style with JavaScript That is what I did not want... If I did that you would see all the border properties in the code. I am doing an HTML editor and this is code I do not want users to see when wiewing the source. It is only when viewing the design that I wanted dashed cell borders. Now when viewing the design I will use a css class and if the user wants his style in the output file, he will set his own class. thx anyway. Mat |
| All times are GMT -4. The time now is 2:21 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC