I am using ngx-doc-viewer to load the excel file,
and i want to highlight excel rows. any ideas on how to do that?
<ngx-doc-viewer
[url]="url"
viewer="office"
style="width: 1000px; height: 800px"
></ngx-doc-viewer>
Related
I am using an email template builder (pro.beefree.io) in which I have put some images, including my company logo. I then export the html from pro.beefree.io and paste it in the code as body for the wp_mail function. Here is a snippet of the html code containing the logo image:
<div class="alignment" align="center" style="line-height:10px"><img class="big" src="https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/868180_852318/logo-image.png" style="display: block; height: auto; border: 0; width: 440px; max-width: 100%;" width="440"></div>
Issues
This works and the email is sent with the image. However, when a user opens the email they get a "Externally linked resources in the message have been blocked" warning and have to "allow" to be able to view the images. Is there a way to fix this so the images show up immediately? The problem occurs on at least gmail, outlook and roundcube (our server email).
I want the images stored on our own server for safety if the company removes our images or something else happens to them. I tried to place them inside a folder and put src to it as follows:
src = "https://website.com/images/logo-image.png"
We used similar path for images on the website which works fine. However, in the email which is sent via wp_mail no images show up, there is just a placeholder image symbol instead. How can I put images in my own folders and link them properly?
I want to build a website for a local football (soccer) team but I'm not sure how I can display the league table standings on the site which are available at http://wnl.org.uk/tables.htm.
I can create an iframe but it pulls in the entire page and I only need one of the tables. I would also like to make it responsive and apply my own styles to be consistent with my theme.
It's only an amateur league so it's not available via opta or something similar so I'm unsure what's the best approach.
Can any one help - This question is more of a how can I do something rather than this is what I've got. I'm not sure how I can achieve it.
If the page you want to fetch the data from is inside your server you can use the jQuery .load() function like this: (this method is without the iframe)
<div id="target-div">
</div>
And than use this code:
$('#target-div').load('./tables.htm #main');
When this method executes, it retrieves the content of ajax/test.html, but then jQuery parses the returned document to find the element with an ID of container. This element, along with its contents, is inserted into the element with an ID of target-id, and the rest of the retrieved document is discarded.
.load() jQuery Documentation
But this can only be done if this site is inside your server, because it gets the contents using AJAX.
Hope this helps.
Another Way
If you want to do this with iframe you can use some css-tricks to display only the part of the page you want.
<div style="border: 2px solid #D5CC5A; overflow: hidden; margin: 15px auto; max-width: 575px;">
<iframe scrolling="no" src="http://wnl.org.uk/tables.htm" style="border: 0px none; margin-left: -36px; height: 812px; margin-top: -486px; width: 650px;">
</iframe>
</div>
Source: http://www.dimpost.com/2012/12/iframe-how-to-display-specific-part-of.html
The downside of this is that you will need to test different values for the margins of the iframe and the width of the div manually until you get the result you want.
Shortest way using PHP
1) Create a file "tables.htm" and leave it empty.
2) Create a file "test.php" (Make sure those are in the same folder).
3) Add there this lines of code:
<?php
$contents = file_get_contents("http://wnl.org.uk/tables.htm");
$file = fopen("tables.htm", "w") or die ("Unable to open file");
fwrite($file, $contents);
fclose($file);
echo "Successful";
?>
4) Run this file in your browser. This will write the contents of the file in that website to the file "tables.htm" in your Server.
5) Now that the file is written access its data using the .load() function I mentioned above.
<div id="target-div">
</div>
<script>
$('#target-div').load('tables.htm #main');
</script>
6) If you have option "Cron Jobs" in your host, use that to make the script "test.php" run in a specific time without you needing to run it in your browser manually.
This is the best way you can do it, and the best part is that you can change the style of the elements as well.
I need to display a lot of GIF pictures in one place, and being able to add some whenever I want.
The solution I have found is to create a batch file which creates an HTML page displaying the GIF. But I'm a beginner with CMD language and after some research here is what I have written :
FOR /F %%G IN ('dir /B *.gif') DO echo ^<img src="%%G"^>^ ^<br^>^<br^>^<br^> >> gifs.html
It works but it is really simple, and I don't seem to be able to add page settings and layout (such as center the GIFs, maybe add a background etc...) automatically from the Batch. I can't find anything on the web as to how to do that. Can someone put me on the rails here ?
Thanks very much !!
Djokito
you can create separate static CSS file (named e.g.: your.css) in the same folder containing something like:
body{
text-align: center;
background-color: #aaaaaa;
}
img{
width: 300px;
}
and then add this line to the beginning of your batch file:
echo ^<link type="text/css" href="your.css"^> >> gifs.html
<div id="container" style="width:100%; height:50px; border:5px solid black;">
<div id="progress-bar" style="width:67%;
background-color:orange;
height:50px;">
</div>
</div>
Where it says "style="width:67%" I want to have the 67% read from a local text file, for a script in progress. How do I go about this?
Short answer - you can't read/write local text file on client's computer:
JavaScript and the DOM provide the potential for malicious authors to deliver scripts to run on a client computer via the Web. Browser authors contain this risk using two restrictions. First, scripts run in a sandbox in which they can only perform Web-related actions, not general-purpose programming tasks like creating (or reading) files.
https://en.wikipedia.org/wiki/JavaScript#Security
What we are doing:
I suggest converting the text file's contents to JSON
Use Jquery.getJSON() function to parse the object
Use the width node to set the style tags width value
All together now:
Example data in file:
[{"date": "2016/01/05", "time": "18:46:00", "title": "ReadMe", "width": "67"}
jQuery.getJSON('textfiletoread.txt',function(data){
// data is an array of objects
$.each(data, function(){
console.log(this.width); // log the width
$('#progress-bar').css('width', this.width); //use the text files width
});
});
Goal:
If the user use IE, I want a part of the sourcecode, that is "<div id="ctl31_ctl09" style="width: 100%; height: 100%; overflow: auto; ;">"
to be changed into
"<div id="ctl31_ctl09" style="width: 150%; height: 100%; overflow: auto; ;">" in SSRS.
Firefox still gonna use the orginal sourcecode if the user(s) use FF.
Problem:
How and where should I enable to change the source code after the original code is generated.
My logical solution and ide would be:
1. Generate the original code and display the result based on the original code in
http://myserver/report.
2. if the browser use IE, change part of the sourcecode that is:
"<div id="ctl31_ctl09" style="width: 100%; height: 100%; overflow: auto; ;">"
into
"<div id="ctl31_ctl09" style="width: 150%; height: 100%; overflow: auto; ;">".
The question is
how to do it?
I strongly believe that you also gonna need to use and change part of the code in ReportingServices.js
Information:
*I'm using SQL server 2008 R2 and Visual Studio 2008 Professional.
*The sourcecode is webdevelopment.
The answer is to download IE11 and this problem will disappear.