add html to an individual cell in a datatable in powershell - html

In powershell I have a datatable that contains a columns of ID's. I am trying to add a specific hyperlink to each of the ID's.
for example if the value in the cell of the ID column is 12345 it will link to www.google.com/12345
I have tried adding the html to the string inside the datatable, but whenits outputted instead of making it a hyperlink it simply shows the href code

Related

First of Function in SSRS / show first row of each page

In my SSRS report, I have more than 500 pages. In the header section, I have used an textbox with expression First (Productname), where the productname is one of the column in my report.
How to display the First row productname of each page on that control? Now it will always display the first row productname of first page on all the pages.
You need to use the ReportItems collection. Get the name of the cell that contains the text you want by clicking it and looking at the properties, assuming the name is myColumnCell then the expression in you header cell would be
=First(ReportItems!myColumnCell.Value)
Look here for more details if required.
https://learn.microsoft.com/en-us/sql/reporting-services/report-design/built-in-collections-reportitems-collection-references-report-builder

Use VBA to get "background-color" value from HTML <td> tag for use in Excel

I have spent many hours researching how to get the color value from a tag like the following:
image from HTML page
I have retrieved the tags as
Set tdItems = hTable.document.getElementsByTagName("td")
I have tried:
strStyle = tdItem.getAttribute("style") 'but that does not return the attribute values, simply the name of the attribute "background-color".
I tried:
strStyle = tdItem.Style("Background-Color") 'fails to compile
I have been unable to find the right command to return just the background-color value. I am not interested in the other style attributes. I am retrieving the tdItem.innertext values for the whole table successfully into a spreadsheet, but I'd like to grab the color coded into each HTML cell and use it in the spreadsheet.
Can anyone help?

Set jsp variable to value of a links id

I'm building a simple forum where the SQL query changes whats pulled out by what link is clicked and what I thought I could do was just set a varaible to the value of the topic name and it would give each row their own variable value, but it overwrites it everytime it loops through the forEach and only ever pulls out data for the last row it outputs, but with the id of the <a> it sets the value to the right row in the table.
Is there anyway I can set the variable to the value of the <a> id or would I have to populate an array full and set the varaible to the value of the next element of the array
<td><a id="${row.topic_name}" href="ViewPosts.jsp" onclick='<c:set var="post" value="" scope="application"></c:set>'><c:out value="${row.topic_name}"></c:out></a></td>
A bit of a roundabout solution didn't take too much code though, used javascript to get the id passed it to a hidden input and got the javascript to auto submit to a jsp file that forwarded the parameter I needed onto the jsp page that called the query.

Pass textarea values to jsp

I am populating a list of string from jsp to an html <textarea>. e.g.
out.println("<textarea name='word_suggest' rows='10' id='word_suggest'>");
while(it.hasNext()){
out.println(it.next());
}
out.println("</textarea>");
I want the user to edit the textarea and read back the values to jsp (e.g. create another list of strings) so that I can work around with the new list. Can I do this without using the <form> and <post> action e.g work around within the same page?

how to add contents of list box to field in table?

I have a form which contains listbox which will contains links of attachment when ever user use the file dialog. Is there a way to have a field in the corresponding table to contain all the links.
you need to create a new table in the database that will contain the links because there are many links (potentially) for each row.
links (linkid, mainid, linkpath)
mainid is the id of the record that you want these links attached to.
Then in the rowsource property of the listbox put a selects only those links with a mainid of the current record.
In the OnCurrent event of the form you will need a
listbox1.requery
statement