passing vales across different HTML FILES [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 4 years ago.
Improve this question
i have three HTML files with java script as well. Now i am interested to create a forth html file to display the result of three different variables declred and used in three different html files.
i tired to used form action to import files but was not able to solve the problem.
Can one one plese suggest the best option to tackle this situation.

You can share data between your pages in many ways, generally either trough your back-end or cookies/localStorage on your front-end. To save a variable you can use localStorage.setItem(key, value) and you can get that variable in another page with var my var = localStorage.getItem(key)

Related

What database should I use in this condition? Or should I use them at all? [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 1 year ago.
Improve this question
I have created a simple project with two HTML page 'home' and 'details'. I have a spreadsheet of some data I want to show as list in 'home' page and on clicking shows associated details. I tried searching in internet but I was left with even more question than before. The data consist of 10 column and 1000 rows and might reach 5000 rows.
If you are facing trouble while learning DataBase, there is an alternative you can try and it is very easy to understand and implement in your code.
You can learn about JSON (JavaScript Object Notation), Simply you have to create a JSON file in which you can store the detail of all those 1000-5000 rows and render them on your Web page using JavaScript

Making a memory game with JavaScript and i need a diferrent way to match cards [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 2 years ago.
Improve this question
I'm currently learning JS as a project i decided to make a memory game with the function of connecting questions with answers
currently its matching the cards when they share the same image and for my project I need to make pairs of cards with different images
Could anyone give me an alternative to giving values to the cards, I would like to give classes to the cards manually
return card.getElementsByClassName('card-value')[0].src;
Very easy way is to store values/data using data attributes. Here's a quick overview:
https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes

How to make next page link when document size reaches to specific length? [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 6 years ago.
Improve this question
I have built an Admin section where i can see all the contents from database in a table. everything is fine but if the database table has thousands of rows I have to scroll down very deep. is there any way I can make links like `1,2,3.Next the way google search results do? or is there any even better way?
Isn't is going to be something like:
if($(document).height>2000){
//what should i do?
}
Looks like you are using jquery. If you are going to implement everything on your own it may be time consuming - although it would be fun!
To save some time, there are quite a few plugins available to achieve this. Refer:
https://datatables.net/
http://www.jqueryscript.net/table/Client-side-HTML-Table-Pagination-Plugin-with-jQuery-Paging.html
Since you may have huge data you should be using server side pagination instead of client side. Here is another SO link which explains the difference between them : Pagination: Server Side or Client Side?

Is it possible to use the Twitter API to feed tweets into a local text file? [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 using a projection mapping programme, with part of the project taking text from a local text file, and inserting it into the programme.
Instead of manually filling this text file with pre-populated content, is it possible to use the Twitter API to feed in tweets to this local text file?
I'm not very familiar using javascript to access twitter's API, but you should be able to achieve that using twit.
Depending on the number of data you're wanting to obtain, the streaming API will be a better option. This will give you a large number of data with less likelihood of reaching a limit.
If you have more question regarding that specific package, you should give it a try (plenty of examples available) and post specific questions with proper tags (i.e. javascript, twit)

Is there a function to gather the amount of memory used in a specific File Directory [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 8 years ago.
Improve this question
If you can include Javascript so it automatically updates that would be awesome. I want it to gather the amount of space that is being used in directory /wy/ and display on the index.php file and automatically update whenever a file is added to file directory /wy/.
You cant achive this only with javascript as your tag implies. you may need to use any file APIs available. Better ways is to have a Server implementation for this and get the memory details from server using Ajax or any client-server communication techniques.

Categories