i´m having a problem trying to load my nft marke, that´s what i did:
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script>
<body style='margin : 0px; overflow: hidden;'>
<a-scene embedded arjs="trackingMethod: best; sourceType: webcam;debugUIEnabled: false;">
<a-nft
type="nft"
url="nftmarkers/pinball"
smooth="true"
smoothCount="10"
smoothTolerance=".01"
smoothThreshold="5">
<a-box position='0 0.5 0' ></a-box>
</a-nft>
<a-camera></a-camera>
</a-scene>
</body>
</html>
and that´s the error that it returns to me:
432abd3a-f330-4cc8-8c03-faa918143656:76 Error in loading marker on Worker 404
The problem was my server sending the page as result and not the content. I fixed sending the web app to firebase.
Related
I am trying to add a saveto drive button to my website. Following sample code works if the url in the browser is typed as "localhost" and FAILS or nothing happens, no error when used with the server name or domain name.
<!DOCTYPE html>
<html>
<head>
<title>Save to Drive of exported PDF: Async Load with Language</title>
<link rel="canonical" href="http://global.com">
</head>
<body>
File 1 Emp 5::
<div class="g-savetodrive"
data-src="./pdfGen.jsp?selEmp=5"
data-filename="Emp5.pdf"
data-sitename="Sample Application">
</div>
<BR/><BR/>
File 2 Emp 6::
<div class="g-savetodrive"
data-src="./pdfGen.jsp?selEmp=6"
data-filename="Emp6.pdf"
data-sitename="Sample Application">
</div>
<script type="text/javascript">
window.___gcfg = {
lang: 'en-US'
};
</script>
<script>
window.onLoadCallback = function(){
gapi.auth2.init({
client_id: "<CreatedApplication Key>.apps.googleusercontent.com"
});
}
</script>
</body>
</html>
Have created a project in google console, Created credentials clientkey, set the project to Testing/developer mode.
When accessed the application as "http://localhost:8180/Sample/gDrive.html" or "http://localhost:8180/Sample/gDrive.jsp",It's working fine. But,
"http://devsys.mtv.global.com:8180/Sample/gDrive.html", the buttons are rendered and on clicking that, no error is thrown, nothing happens. Very disgusting.
Any help is appreciated. Thank
Be sure to add the Authorized JavaScript Origin
More information can be found here:
https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow
I am starting to learn react.js and was doing a simple Hello program.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div id="hello_container" class=""></div>
<script src="https://unpkg.com/react#16/umd/react.development.js" ></script>
<script src="https://unpkg.com/react-dom#16/umd/react-dom.development.js" ></script>
<script>
class Hello extends React.Component {
constructor(props) {
super(props);
}
render() {
return React.createElement(
'div',
null,
`Hello ${this.props.name}!`
);
}
}
ReactDOM.render(React.createElement(Hello, {name: 'React'}, null), document.querySelector('#hello_container'));
</script>
</body>
</html>
But i was running into an issue for these two script tags ,
<script src="https://unpkg.com/react#16/umd/react.development.js" ></script>
<script src="https://unpkg.com/react-dom#16/umd/react-dom.development.js" ></script>
Failed to load resource: the server responded with a status of 403
(Forbidden)
Uncaught ReferenceError: React is not defined
I found something on google as to run the html code on a web server(https://) rather than from file system (file:///)
So i ran a local web server as python3 -m http.server 1234
and it worked . I got output as Hello React!.
But i want to know why i was getting forbidden error when running the code from file system ?
Is it related to same origin allow access ?
What is different in running html code from file system and on a web server?
this is my code at index.html
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
<script src="javascript/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="javascript/i18next-1.7.4.js" type="text/javascript"></script>
<title>i18next test</title>
</head>
<body>
<p id="id001" data-i18n="first_data">first</p>
</body>
<script type="text/javascript">
$(document).ready(function(){
language_complete = navigator.language.split("-");
language = (language_complete[0]);
i18n.init({
lng: language,
resGetPath: 'locales/__lng__.json',
fallbackLng: "en",
}, function(){
$("first_data").i18n();
});
});
</script>
</html>
And I've created 2 json file at the same directory with index.html
locales/en.json
locales/de.json
json file content:
{
"first_data": "de-first-data"
}
Firefox try to load de.json and en.json but get the error 404.
Do you have any idea why i18next cannot load the json file.
This is my folder structure below:
index.html
locales/de.json
locales/en.json
javascript/i18next-1.7.4.js
javascript/jquery-1.11.1.min.js
You host application in IIS. IIS by default (as far as I know) doesn't support JSON file type.
Following question is related to same problem:
ERROR 404.3 Not Found for JSON file
Have you tried with ?
resGetPath: 'javascript/locales/__lng__.json',
I'm just trying to create a canvas in my browser with the following code :
<!DOCTYPE html>
<html lang="eng">
<head>
<title<abc</title>
<script type="text/javascript">
window.onload=canvasApp();
function canvasApp()
{
var canvas=document.getElementById("one");
if(!canvas||!canvas.getContext)
return;
}
</script>
<meta charset="utf-8">
<body>
<canvas id="one" width="400" height="500">
Your browser doesn't support canvas
</canvas>
</body>
</html>
Why i'm getting canvas=null in the following line
var canvas=document.getElementById("one");
(I'm using the latest versions of chrome and firefox)
Your HTML leaves somewhat to be desired.
Give the W3C Validator a go. Right now it reports 7 Errors and 4 warnings.
Whatever I try I couldn't make this swf file work.
if I put all the files into my root everything works perfectly fine.
Here is my path format;
root: where my index.php located.
inside the root, I have a folder called "public".
inside "public" I have another folder called "_carousel_flash".
This is the place where my swf file is located.
I also have "js" folder located in this directory.
Here is the html code I'm using for adding the swf file.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Galleria - Inspire Creativity</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="public/_carousel_flash/js/swfobject.js"> </script>
<script type="text/javascript" src="public/_carousel_flash /js/swfaddress.uncompressed.js"></script>
</head>
<body>
<div id="contents">
</div>
<script type="text/javascript">
var so = new SWFObject("public/_carousel_flash/block_slider.swf", "movie", "100%", "100%", "8", "#ffffff");
so.addParam("quality", "high");
so.addParam("id", "movie");
so.addParam("allowFullscreen", "true");
so.write("contents");
so.addParam("salign", "t");
</script>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Galleria - Inspire Creativity</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="public/_carousel_flash/js/swfobject.js"> </script>
<script type="text/javascript" src="public/_carousel_flash /js/swfaddress.uncompressed.js"></script>
</head>
<body>
<div id="contents">
</div>
<script type="text/javascript">
var so = new SWFObject("public/_carousel_flash/block_slider.swf", "movie", "100%", "100%", "8", "#ffffff");
so.addParam("quality", "high");
so.addParam("id", "movie");
so.addParam("allowFullscreen", "true");
so.write("contents");
so.addParam("salign", "t");
</script>
</body>
</html>
PUBLIC spell mistake
Or else i guess <script> tag is causing some issues, try embedding your swf object file
I can't be sure what's causing your error, but here are some things I notice about your code:
You're using SWFObject 1.x, which is very outdated and uses different syntax than SWFObject 2.x. Do you have the correct swfobject.js file for SWFObject 1.x? This is a fairly common issue for SWFObject users.
In SWFObject 1.x, you can't addParam after the so.write statement... it will not be reflected in your page.
so.write("contents");
so.addParam("salign", "t");
should be
so.addParam("salign", "t");
so.write("contents");
You have a typo in the URL for SWFAddress (a space just before "/js/").
If you want to be sure your SWF is located in the root, try loading it directly in the browser using the absolute URL.
Speaking of absolute URLs, it's often helpful to try them in your SWFObject code, too. Your current URL is file-relative; I suggest either using a site-relative URL ("/foldername/filename.swf") or an absolute URL ("http://yourdomain.com/foldername/filename.swf").