Datatables don't load content of database - sql

I'm trying to load users from a table in my database using datatables(https://datatables.net/) but the page is not loading anything at all. I'm getting these errors when I open the console
[1]: https://i.stack.imgur.com/ykNTL.png
I loaded the js and css here in this order:
[uncaught ReferenceError: jQuery is not defined at dataTables.bootstrap.min.js:5 at dataTables.bootstrap.min.js:5][1]
<script src="~/lib/dataTables/jquery.dataTables.min.js"></script>
<script src="~/lib/dataTables/dataTables.bootstrap.min.js"></script>
<scripts src="~/lib/jquery-validation/dist/jquery.validate.js"></scripts>
<scripts src="~/plugins-site/jquery-ui/jquery-ui.min.js"></scripts>
<link href="~/lib/dataTables/dataTables.bootstrap.min.css" rel="stylesheet" />
<link href="http://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css"
/>

if the page is not loading anything at all after add Query library i reccommend add before link of script defer after that the table load every script
make links like this
<script defer src="~/lib/dataTables/jquery.dataTables.min.js" ></script>
read this script-async-defer

Related

vue project not working when change the base url in index.html file to my website url

This is my index.html file
when I change the base url to my website domain "https://new.weservio.com/" this error appears
Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../". when I try to import vue according to this solution https://microeducate.tech/importing-a-package-in-es6-failed-to-resolve-module-specifier-vue/ .other modules can't be resolved too.
<html lang='en'>
<head>
<meta charset='UTF-8' />
<link href='images/logo.png' rel='icon' />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<link href='https://fonts.googleapis.com' rel='preconnect'>
<link crossorigin href='https://fonts.gstatic.com' rel='preconnect'>
<link href='https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;700;900&family=Tajawal:wght#300;400;500;700;900&display=swap'
rel='stylesheet'>
<link href=' https://cdnjs.cloudflare.com/ajax/libs/vue/3.0.0-beta.14/vue.esm-browser.js' >
<title></title>
<!--
EDIT THE FOLLOWING CODE INSIDE THE BASE TAG
'http://localhost:3000/' ==> 'REPLACE IT WITH YOUR BASE URL'
-->
<base href='https://new.weservio.com/'>
</head>
<body class='rtl:font-tajawal font-poppins overflow-x-hidden'>
<div id='app'></div>
notice: when I leave the url as "http://localhost:3000/" and run the project locally with npm run dev .The website is working fine.
notice: This site was working correctly before on same domain url ,but I was tring to use ftp-simple extention on vs code to load automaticllay after save to server from my working directory .then the website is not working anymore .I don't know if this related.

Saving HTMLWidget with links to HTML dependencies instead of embedding them

I save my ggplotly object using saveWidget() function. If I do it with selfcontained=TRUE option, all HTML dependencies (javascript libraries and CSS styles) are saved inside the HTML file making it very big. If I use selfcontained=FALSE, those dependencies are saved in separate _file folder, and linked from the HTML file:
<script src="testA_files/htmlwidgets-1.5.3/htmlwidgets.js"></script>
<script src="testA_files/plotly-binding-4.9.2.1/plotly.js"></script>
<script src="testA_files/typedarray-0.1/typedarray.min.js"></script>
<script src="testA_files/jquery-3.5.1/jquery.min.js"></script>
<link href="testA_files/crosstalk-1.1.1/css/crosstalk.css" rel="stylesheet" />
<script src="testA_files/crosstalk-1.1.1/js/crosstalk.min.js"></script>
<link href="testA_files/plotly-htmlwidgets-css-1.52.2/plotly-htmlwidgets.css" rel="stylesheet" />
<script src="testA_files/plotly-main-1.52.2/plotly-latest.min.js"></script>
For jQuery, for example, I know I can use the code.jquery.com repository and replace my call with src="https://code.jquery.com/jquery-3.5.1.min.js". Is there similar public repositories for all other dependencies?
Of all the dependencies you list, plotly is probably the biggest. The latest plotly refers to this cdn:
https://cdn.plot.ly/plotly-basic-2.5.1.min.js
You can see this by look at the plots dependencies like so:
p <- ggplotly(p) %>% partial_bundle(local = FALSE)
p$dependencies

asset() function in twig gives an NotFoundHttpException "No route found for "GET /favicon.ico"

I have just installed a new Symfony project (I use xampp). When I started the application the favicon on the url tab wasn't showing, i opened the source code and opend the icon from there, but I got the error message I writed in the title.
In the code the link is presented as:
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
and in the source code it was like
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
What is the problem, am I missing something ?
Thanks
you should put the file in the web folder
the asset function target a folder web by default.
http://symfony.com/doc/current/best_practices/web-assets.html

jquery-ui progressbar not showing

I'm trying to add a simple progress bar to my application in rails using jquery-ui. I'm following this example: http://jqueryui.com/progressbar/
I create the div
<div id="progressbar"></div>
and in my JS I have
$(document).ready( function() {
$("#progressbar").progressbar({
value: 37
});
});
But nothing happens to the div in the html - it remains empty and unstyled(ie no additional CSS is applied to it).
I have checked that I have jquery-ui included in my application - in particular, I have made certain the jquery-ui css file is included.
However, I am willing to bet the problem has something to do with jquery-ui not working properly in my app, because I was having another issue with it and the tooltip function, which I asked about over here: positioning jQuery tooltip
This is driving me nuts, does anyone have any ideas?
I had the same problem right now.
It seems like the referenced libaries in the example do not work.
The error i get from the "Firefox - Developer Tools - Browser Console" is:
ReferenceError: $ is not defined
(I tested on Firefox 32.0.3 and IE 11)
If you just copy the example html/jquery source from "http://jqueryui.com/progressbar/" to a local file (lets call it: "testJqueryProgressBar.html") and double click it, you will see no progress bar!
Source of "testJqueryProgressBar.html":
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Progressbar - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<link rel="stylesheet" href="//jqueryui.com/resources/demos/style.css">
<script>
$(function()
{
$( "#progressbar" ).progressbar({ value: 37 });
});
</script>
</head>
<body>
<div id="progressbar"></div>
</body>
</html>
Therefore i checked the links in the header of the example and all reference something.
So the links are valid!
I even tried to reference the jquery libs from another provider, f.e. : https://developers.google.com/speed/libraries/devguide?hl=de#jquery-ui.
Same problem!
Then i went to http://jqueryui.com/download/
Selected Version : 1.11.1 (Stable, for jQuery1.6+)
Selected a different UI theme at the bottom
Downloaded the zip and referenced these unziped jquery sources in my local example testJqueryProgressBar.html and it worked.

0x800a1391 - JavaScript runtime error: 'WinJS' is undefined

I have download the code from CodePlex
Then I install the sdk's of live,telerik etc
After installation I ran the code and I'm getting the following error
`0x800a1391 - JavaScript runtime error: 'WinJS' is undefined`
The error occured in the Converters.Js file here it is
(function() {
var r = Windows.Storage.ApplicationData.current.roamingSettings.values;
// Export shortDate
WinJS.Namespace.define("codeSHOW.Converters", { // Error Occured here
});
})();
Any help is highly appreciated.
Thanks.
Did you include base.js in your htm file before which ever file is making that call?
On your default.htm page (or other html pages with the same code) change the WINJS References to the location of this in your app ie
References > Windows Library for JavaScript 2.0 > js > base.js
I had the same problem and just had to remove the .preview on the URL reference from
<!-- WinJS references -->
<link href="//Microsoft.WinJS.2.0.Preview/css/ui-dark.css" rel="stylesheet" />
<script src="//Microsoft.WinJS.2.0.Preview/js/base.js"></script>
<script src="//Microsoft.WinJS.2.0.Preview/js/ui.js"></script>
to
<!-- WinJS references -->
<link href="//Microsoft.WinJS.2.0/css/ui-dark.css" rel="stylesheet" />
<script src="//Microsoft.WinJS.2.0/js/base.js"></script>
<script src="//Microsoft.WinJS.2.0/js/ui.js"></script>
You should add to References Windows Library for Javascript