I'm trying to make work a form in internet explorer 8 and angularjs 1.2. I may say that it works perfectly in last versions of Chrome and Firefox.
The site to see this: http://barcimaster.com/solicitud_de_presupuesto/1
I made a fiddle also to see a simple version: http://jsfiddle.net/r01010010/e9kvd/11/ but it doesn't work!
So, what i'm missing. I already tried using:
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
But nothing happens... i tried to debug the function but never gets into the function "update".
Related
When I am starting a react app by "npm start" command in VScode terminal, it starts to loading forever on the browser. I am completely new to that so I have no idea what and where could go wrong. I have read that it may be because of mistakes in code so I deleted all the things which caused "compiled with warnings", but even though now terminal says "compiled successfully", nothing changed. In the browser it is stuck on loading...
Note that the development build is not optimized. To create a product build, use npm run build.
Does it have something to do with a problem? Looking forward to understand better what is going on. Thanks!
Update: so I loaded an index.html file through live server extension in vscode and opened up developer tools and I saw a bunch of problems, which are all referring to a syntax error in the very beginning of the initial htmls code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
That is what I see on dev tools:
Also, I tried "git status" in git bash and I see "nothing added to commit but untracked files present (use "git add" to track)" and it lists ALL of the files from my user folder.
Important note: earlier it was all fine and never have I ever seen all of these folders in a bash after running git status. Plus, I was even able to render react app.
I accidentally deleted the package.json. Restoring it solved my problem.
the main problem are:
You create an infinite Component, nesting the parent component in the parent component
https://i.stack.imgur.com/ngl1s.png
You import the wrong Component path so that it creates a nesting Component
double-check your path is exactly correct
or check by Comment your code, circling the Component that makes an error then fixing it
so if you can't solve it remember your Component is nesting, then it makes infinite localhost loading
I solved by myself
According to this site:
https://developers.tron.network/docs/tronlink-integration
I am suppose to be able to connect ANY website to TronWeb, following this code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<button onclick="gettronweb()">Can you get tronweb from tronlink?</button>
<script>
function gettronweb(){
if(window.tronWeb && window.tronWeb.defaultAddress.base58){
document.write("Yes, catch it:",window.tronWeb.defaultAddress.base58)
}
}
</script>
</body>
</html>
This however does not work when I try to do it, could somebody explain to why?
I have tronlink (Chrome extension) installed, and it works on all other sites, so that's not the issue.
Or am I missing something?
you need to install tronweb and use the methods provided . that example is kind of just like a skeleton to show you how it would be called . but there needs to be more then just that file.
im newer then you most likely at coding lol so i am probably wrong just giving my 2cents
It might seem that Tronlink requires a SSL server before running....
Works on a SSL certified server....
Tron Development seems tricky somehow for new users with lack of proper documentation.
Unlike Web3/Metamask which can work on localhost itself for checking and development tron seems to not work with "insecure" network/server.
You need a SSL certified server in-order to run it properly (yes its strange might be for some security ! who knows).
What i did while testing is created a JS file where i've written all tronlink (TronWeb Extension) related code and used "index.html" file to interact with it (For some reason !)
Now what I did was hosted this index.html file along with my JS code for tronlink interaction to Github Pages ! Yes for free + you get Github's SSL pre installed server and that's enough for your program to run and test.
Note: Github pages needs your repository to be kept public inorder to host it. (Not preferred for private projects)
You can also host it in your personal AWS with SSL certificate or any other Servers with SSL certificate.
Hope this helps all with this same issue !
I learn Reactjs and read somewhere about this but cant find it now. how
to make the browser updated download the app files.
Again typically after a new release has been published?
Cache-control?
Like when I build a new version 1.0.1 and then next time 1.0.2 and then the browser should detect this and re download the changed files into browser cache.
Is there such thing?
UPDATE
here is my index.html with some Cache-control that dont work correctly
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=0" />
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
..........
That functionality is built right into the HTTP protocol, but it works based on timestamps, not on versions.
With the HTTP request for your app's script, the browser sends along a timestamp of the cached version.
If that version is newer than the version on the server (i. e. it is up to date), the server replies with HTTP 304 Not Modified, and an empty body.
If the browser's version is out-of-date, the server will instead reply with HTTP 200 OK and the actual script.
(Note that this is subject to browser and server configuration, but this is how it is supposed to work, and usually does.)
I am new to Angular js.
I have observed that new code blocks written in Angular js module file or controllers does not get executed sometimes and when the web site is refreshed surprisingly the code blocks get executed.
Is there any Angular js function to force the execution of code?
Is there a maximum limit in count of lines of code that can be executed?
It might be because of browser caching.
In each html template just add the following meta-tags at the top-
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
Or you can simply disable caching from Dev Tools.
I have several tests that write HTML code to a temp directory on a CentOS 7 box and then have Chromedriver load them up to do some basic tests on them. In this example I am writing the HTML code:
<html><body><form> <label for="text">Text</label>
<input type="text" id="text"></form></body>
However when I get the HTML content via getAttribute('innerHTML') I get this
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, user-scalable=no">
<title i18n-content="title">file:///tmp/formJbDsBv</title>
...
which is clearly not the code I wrote. The log file on the Selenium side is
09:45:03.980 INFO - Executing: [get: file:///tmp/formJbDsBv])
09:45:04.084 INFO - Done: [get: file:///tmp/formJbDsBv]
But, of course, the test works locally and on a virtual machine, but not on my test box, which runs using Xvfb.
Plus, the technique I use works on about a hundred other tests.
I don't know why this solves it, but adding .html to the end of the filename made it work. This is really weird because some of the tests that passed did not have .html at the end of their filename. Weird, but it's working now.