Initialize from html table - getorgchart

I have been trying to make an org chart using the code from this example http://www.getorgchart.com/Demos/Initialize-From-HTML-Table
I am making my table dynamically from xml data (planning to do this for many different xml files so thats why I haven't hardcoded the table). The result does not look right and I'm not sure whats going wrong. I suspect that maybe its trying to make the org chart before my table is made. I have no console errors and I get a plain blue screen with the search bar and arrows when I try to run everything.
Here is my html code:
https://pastebin.com/6b1d0gEC
<body onload="getXML()">
<div id = "conditions"></div>
<div style="float: right; width: 10%; height:100%; text-align:center; display: none;" ></div>
<table id="orgChartData" >
<tr>
<th>title</th>
</tr>
<tr>
Here is my JS code
https://pastebin.com/c7fFerqH
Here is the XML im using to generate the table
https://pastebin.com/0k3xQ5Th

Related

display quotation marks within a variable freemarker - netsuite advanced pdf

I'm trying to show results in the PDF from the netsuite database, however some results have quotation marks, so the results are incomplete, try adding "? Html" at the end of each variable, but do not It affects the column that I want.
I hope and you can help me, greetings!
Netsuite Advanced PDF template - Freemarker
<table cellmargin="5"><#list results as result><tr>
<td style="width: 150px;">
<#if result.custitem_gg_item_image?length != 0><img src="https://----com${result.custitem_gg_item_image}" style="width: 125px; height: 125px;"/><#else><img src="https:/---.com" style="width: 125px; height: 125px;"/></#if>
</td>
<td><strong style="font-size: 12pt"><u><span>${result.itemid?html}</span></u></strong><br/><br/><strong style="font-size: 10pt"><span>${result.displayname?html}</span></strong><br/><br/>
<#if result.purchasedescription?length != 0><span>${result.purchasedescription?html}</span><#else><span>${result.salesdescription?html}</span></#if></td>
</tr>
</#list>
</table>
Just having a quotation mark in the field values shouldn't cause any issues. Do you also have html in the sales and purchase descriptions? Normally you should not do that -- leave the html for the storedetaileddescription field.
If your issue is actually html in the descriptions then see this answer: Remove HTML tags in Freemarker Template

basic table padding with html & dreamweaver

I haven't used DW for a while, excuse my beginners question.
I have created a table with 2 rows & 1 column within HTML. I have inserted an image in to the top row and one image in to the bottom row.
With border, cell padding and cell spacing set to 0, I cannot figure out why I see pixel padding/spacing at the bottom of each cell. I have changed the background colour of the cells in the table to red so that its easy to show the padding.
Changing the vertical alignment for the cells does not change the issue.
I haven't created CSS page for this.
From what I recall in my previous experience with DW padding and spacing was quite simple when creating a basic table in HTML, so not sure where I am going wrong.
Any help would be much appreciated on where I am going wrong here.
Link to the resulting output when i preview the code in safari and/or chrome
https://dl.dropboxusercontent.com/u/13258883/DW.png
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
</head>
<body>
<table width="512" border="0" cellpadding="0" cellspacing="0" >
<tbody>
<tr>
<td colspan="2" bgcolor="#F50408"><img src="images/Untitled-10_01.gif" width="512" height="107" alt=""/></td>
</tr>
<tr>
<td colspan="2" bgcolor="#F50408"><img src="images/Untitled-10_02.gif" width="512" height="93" alt=""/></td>
</tr>
</tbody>
</table>
</body>
</html>
found the answer i add the following code in to the head
<style>
img {
display:block;
}
</style>

Replace Woocommerce Attribute name with an icon or an image

I'm using the Divi theme along with WC.
I have created 3 product attributes for my tea shop.
I wish to display an image on the front end rather that the name (or label) of the attribute.
For instance, instead of reading Steeping Temperature, I would like to display the image of a thermometer.
I am not a programmer / developper.
Please help
Steph
it is posible to use
after
in css for add an icon to each title of attributes.
#attribute45896{
content:" ";
background-image:url('http://rapido.ir/wp-content/uploads/2017/02/blue.png');
background-size:30px;
background-position:left center;
background-repeat:no-repeat;
padding-left:40px}
<table>
<tbody>
<tr class="alt">
<th id="attribute45896">color:</th>
<td><ul class="jcaa_attr_select jcaa_size_small jcaa_rounded_corners">
<li style="list-style:none;">red
</li>
</ul>
</td>
</tr>
</tbody>
<table>
but woocommerce do not set an auto id or random class to attributes.

JavaFX hide text of column in tableview

I have a tableview and I want to show an image in the first column. My problem is I can't sort the column then. My idea is to set text in the column too and hide the text so it is only for the correct sorting set. Is there a way to do that? Or what other solutions are possible for my problem?
I think this is the perfect example what you wants to do.Still let me know if you have any issue.
Check here
I would have a look at TableColumn.setCellValueFactory() and TableColumn.setCellFactory(). The further is used to provide the actual cell value (used for sorting!), the latter is used to provide the rendering.
In other words: If you need the sort order, you must not change the content, but only the Cell rendering. The methods mentioned above let you do exactly this.
Hope that helps ...
You could do it with just CSS using text-indent. You would also need to set the image as a css background. You did not provide an code of your table, but below is some example:
HTML:
<table width="100%" border="1" cellspacing="1" cellpadding="1">
<tr>
<td class="hidetext image">Text 1</td>
<td>Some text to show</td>
</tr>
<tr>
<td class="hidetext image">Text 2</td>
<td>Some text to show</td>
</tr>
<tr>
<td class="hidetext image">Text 3</td>
<td>Some text to show</td>
</tr>
<tr>
<td class="hidetext image">Text 4</td>
<td>Some text to show</td>
</tr>
</table>
CSS:
.hidetext {text-indent:-9000px}
.image {background:url(http://www.madisoncopy.com/images/jpeg.jpg) no-repeat;}
See how in the left column the text does not show (but it is actually there just indented off the screen).
See this fiddle: http://jsfiddle.net/D297P/

Footable - client wants column width to remain constant between pages

When you have multiple pages of data in a Footable, the column width changes as you page through the data, depending on what appears in each column at any given time. This is ugly.
I think my client's request means I will not have responsive tables, but maybe there is way out of this that I don't see.
Footable handles pagination client-side. Technically, it should be possible to "lock" the column width from the first page and force it to remain the same throughout the data. I don't think Footable has this option, though.
$(function () {
$('.footable').footable();
});
This jsfiddle illustrates the issue (the jsFiddle CSS interferes with mine a bit because it has Footable classes, too).
I could specify the width of the columns in % - that seems to work even when column are hidden as the viewport shrinks.
Does anyone have another/better suggestion?
I am not able to reproduce your problem and the jsfiddle is not paging the footable.
Still, I had a similar problem with column width when I generated the table content after an AJAX call. The solution I found was to apply a class to every cell in the nTH column and then define the width = max-width min-width.
I've added a class to your subject header and defined css for this column ...
http://jsfiddle.net/bgil2012/gHsdE/
<table class="footable" data-page-size="5">
<thead>
<tr>
<th data-toggle="true">Product</th>
<th data-hide="phone">Study Id</th>
<th class="study-title" data-hide="phone">Study Title</th>
<th class="column_condition" >Condition</th>
<th>Results</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Tysabri</td>
<td>001-06-NAT</td>
<td class="study-title">ENER-G Tysabri fatigue and cognition</td>
<td class="column_condition" >Multiple Sclerosis</td>
<td>CSR Synopsis</a>
</td>
</tr>
CSS:
.study-title {
max-width: 20px;
min-width: 20px;
width: 20px;
}

Resources