bootstrap full year calendar setup - node.js

I'm trying to get this package http://www.bootstrap-year-calendar.com up and running. I've got nodeJS installed, have grabbed the package with npm and have setup an html page as per the usage instructions, but I cannot actually get the calendar to render. This is my first foray into nodejs, so I suspect I'm missing something straightforward. Any ideas on what the problem might be?
Thanks as always. My html/js currently looks like this:
<html>
<head></head>
<body>
<script src="./jquery/dist/jquery.js"></script>
<script src="./bootstrap/dist/js/bootstrap.js"></script>
<script src="./bootstrap-year-calendar/js/bootstrap-year-calendar.min.js"></script>
<script>
$('.calendar').calendar()
</script>
</body>
</html>

Related

Unable To Print PDF file Using Print Js

Below Given is my code from which I am trying to print pdf file.
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="print.min.js"></script>
<link rel="stylesheet" type="text/css" href="print.min.css">
</head>
<body>
<script type="text/javascript">
function sample(){
printJS({
printable: "test.pdf",
type: "pdf",
});
}
</script>
<button onclick="sample()">Click Me</button>
</body>
</html>
but it is not working and diving below error on chrome console
Access to XMLHttpRequest at 'file:///test.pdf' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
I am following all the rules said in documentation of Print-js. my {.pdf} file and {.html} file are in same folder. It is Working Fine with {.jpg} File.
Please help me.
I am sharing link of the script I have included in my head tag
JS:- https://printjs-4de6.kxcdn.com/print.min.js
CSS:- https://printjs-4de6.kxcdn.com/print.min.css
It was the problem regarding "Cross origin requests". To solve this you need to start your local server. in my case I started Xampp and moved my files to htdocs folder and BOOM it worked.. I Still dont know why it was working for images and not for pdfs.
HERE IS THE ANSWER ON STACK-OVERFLOW THAT HELPED ME.
https://stackoverflow.com/a/20578692/10333164

Sources Appear Mysteriously

I thought I understood how browsers work, but it seems not. :(
Given a web page:
<html>
<head>
<meta charset="utf-8">
<title>My website</title>
<link rel="stylesheet" href="styles/main.css" charset="utf-8">
</head>
<body>
<div id="container"></div>
<script src="scripts/main.js" charset="utf-8"></script>
</body>
</html>
Served locally by nodejs, the Network panel:
Okay, right. But there's a bunch more Sources not appearing in Network activity:
How do they get there? I see no references to src/scripts/main.jsx or /node_modules in main.js or anywhere else.
BACKGROUND
This is certainly due to some error in my gulp build, specifically with browserify (and babel/react). I'm doing something wrong there, but I'm much more troubled that I cannot understand how these sources are turning up in my browser.
A discrepancy here is most likely due to source maps. From the sources tab, click the menu icon in the top right and select settings. From here uncheck "Enable JavaScript source maps" and refresh to see if this is indeed the culprit.

IE9 HTTPS security is compromised by http://v.zilionfast.in

I have a problem with https security in IE9 only... the message talk about an url that doesn't exist in my code "http://v.zilionfast.in/257344370/?t=vrt".
The issue was detected in different pc (in different networks) with IE9, some of them show the error message, others doesn't show anything.
I have no clue about what script is calling this url because i can't find it. Somebody have a clue about what is happening?
this is the code of the header basically:
<script type="text/javascript" src="#rutaIni#/swfobject.js"></script>
<script type="text/javascript" src="#rutaIni#/basicos.js"></script>
<script type="text/javascript" src="#rutaIni#/prototype-packed.js"></script>
<script type="text/javascript" src="#rutaIni#/scriptaculous.js"></script>
<script type="text/javascript" src="#rutaIni#/glider.js"></script>
<script src="#rutaIni#/modalbox.js" type="/text/javascript"></script>
<link href="#rutaIni#/modalbox.css" rel="stylesheet" type="text/css" media="screen" />
the other part of the code is just a table that is filled with a query and some html (no problem with that).
thank you!!!
It looks like this site is flagged by Vipre and other Internet Security and Antivirus programs to be malicious. It is possible that your web browser has been infected or your code contains elements associated with the site. The only way to know for sure is for you to post your code.

IIS: Configure document root per site?

I'm using ASP.NET Web Forms and have a Master page that references a view script resources:
<script type="text/javascript" src="/Resources/Scripts/jquery.placeholder.min.js"></script>
<script type="text/javascript" src="/Resources/Scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="/Resources/Scripts/helper.js"></script>
The problem is that the document root "/" works totally fine the dev box but breaks the references on the IIS, because the site is not at the root level anymore.
What's the best way to fix this?
Also thought about something like this
<script type="text/javascript" src="<% Server.MapPath("~"); %>/Scripts/jquery-ui-1.9.0.min.js"></script>
or
<script type="text/javascript" runat="server" src="~/Scripts/jquery-ui-1.9.0.min.js"></script>
but both throw errors. I think this is a typical scenario and I would like to know how you guys do this?
user this
<script type="text/javascript" src='<%= ResolveUrl("~/Scripts/jquery-1.4.1.js")%>'></script>
Here is a post which may help your. ResolveUrl not working inline

Using LESS in a Chrome Extension

I'm attempting to use LESS in a tab created via a Chrome extension (chrome.tabs.create), but I'm getting a cross domain error ("NETWORK_ERR: XMLHttpRequest Exception 101"), referring to the LESS JavaScript file. I'm not clear on how to set up the permissions. Adding the LESS JavaScript file to "web_accessible_resources" doesn't seem to help. All other files, such as css and js files load fine. It seems I only receive this error from within the less source. Any ideas?
To explain my setup a bit more, the LESS JavaScript file and .less file are loaded in an HTML file something like this:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet/less" href="static/css/main.less">
<script src="/static/js/jquery-1.8.2.min.js"></script>
</head>
<body>
Whatever...
</body>
</html>
This html file is loaded in background.js like this:
chrome.browserAction.onClicked.addListener(function() {
chrome.tabs.create({url: 'mypage.html'})
});
The manifest file has permissions for "tabs" and "all urls", and loads background.js.
I'm not sure where you include the client side less.js compiler. See also: http://lesscss.org/#client-side-usage. Less.js is a client-side javascript. It seems the less.js loads from an other URL (domain) than your main.less file. This can be fixed by enabeling CORS, see: http://enable-cors.org/. On the domain where home.less has been installed, the server should send an Access-Control-Allow-Origin: * header.
less.js loads the less files with a XMLHttpRequests which supports CORS for most modern browsers see http://caniuse.com/#search=cors. More details can be found at http://www.html5rocks.com/en/tutorials/cors/
For development use less.js from local folder.
<link rel="stylesheet/less" type="text/css" href="styles.less" />
<script src="less.js" type="text/javascript"></script>
for release use any less compiler like lessc.

Resources