Can data from a db be displayed on a web page? [closed] - javascript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I have a very simple question: when loading a web page the Page_Load function is called so that the page can be loaded. In this function can I insert some code that allows me to select and view in the browser the data present in an external database?

This answer could be of help.
You could then write a script that fetches data from a database. How you do that is a question in it self but I can recommend checking out w3schools which is good for learning plain Javascript in the beginning.

Related

How to register a user using only javascript/ajax or jquery [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm trying to register users using only javascript,ajax or jquery, i need to save the information of the users somewhere where i can get it even after the browser is closed,and the new information can't overwrite the old one.
I already tried saving into a xml file or txt file, but without success.
Check these out, one of it might help
http://www.w3.org/TR/IndexedDB/ - Indexed DB
http://www.w3.org/TR/webdatabase/ - Web Sql
http://www.w3.org/TR/webstorage/ - localStorage
You can as well try out a JavaScript Database here
http://www.taffydb.com/ still trying it out myself, hope this helps.

HTML Title From json - SEO Friendly Way? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Changing the page title using jQuery, changes the title on the load of the page - but is there a SEO friendly way to do this?
My data is coming from json and I am handling it in jQuery.
document.title = 'test';
No, bots will only see the static title of the page as it is served by the webserver. Nothing you do in JavaScript will have any effect on that data. Furthermore, your approach is unfriendly to any browser with no JavaScript, making it wholly inaccessible.
You should control your title on the server; perhaps with a PHP script?!

How to create a liveurl preview of link using AngularJS or javascript, and make it clickable? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I do have a textarea element and I use angular for data-binding. I would like to capture the url in the string entered by the user, and generate a clickable live preview of that url. Any idea on how I can accomplish this using AngularJS or JavaScript? Just like Facebook.
Thanks!
You would need some server to do this for you.
You could either use a public service such as https://screenshotlayer.com/, https://www.url2png.com/
or You could run your own server with one of these libraries: https://github.com/brenden/node-webshot or https://github.com/vbauer/manet

Create Html template document from Javascript and Php variables [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am developping an application. As final result the application generates a Html document consisting of variables from external Javascript and Php files.Which is the safest way to pass these variables?.
Thank you very much.
You can use AJAX to do this, you make the request in JS, and process the information in PHP(server side), and you can return an JSON Object with the variables, or simply, return the HTML code and output it.
Hope it helps :D

Load files with JSON [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Is it possible to load several data files (file1.xml, file2.xml, file3.xml,..) with
jQuery.getJSON
My objective is to load data in an application which is based on JQuery+HTML5.
If your data is in the same domain as the javascript code executing the AJAX request, you can do it by a simple jQuery get request:
$.get("/url-to-source",function(response){
//do what ever you want to do with response
});
If the data resides in a different domain than your javascript code, you should use jsonp, see examples:
http://www.jquery4u.com/json/jsonp-examples/

Categories

Resources