How to show client the prototype without using a server for a web site [closed] - javascript

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have created a webpage that takes a skill survey of students of a particular college but they are not ready to give me server yet they would want to see the prototype first how to show them the prototype without using the server but just using the web page that I have created?

A prototype shows how it works without actually working. So instead of getting real data, it can show fake data.
Your survey can show just two or three questions, and these questions can be hard-coded or loaded from a mock object, instead of loaded from the server. Also, instead of actually saving anything, it can just jump to the next question and show a text saying 'Thanks' when you are done.
That way, you can see if your survey has the right look and feel, and they can see that too. Also, it may make it a bit more clear to the server-builders what kind of implementation they need to make. A visible, 'clickable' prototype makes it easier to discuss details in the implementation.

Related

Real time website information/content updating [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 1 year ago.
Improve this question
Since a year and a half I am trying to figure out how some websites update their content in real time without AJAX method.
Please see this example website: https://pro.btcturk.com/en/basic/exchange/BTC_TRY
That website is changing many texts within content in different timing.
It means that when the server is updated with new values in the database then the website is listening to database changes and then reflecting/delivering inside content without ajax calls.
Can someone give an example how to achieve such functionality possibly using Javascript or PHP normal hand-code appreciated?
Thank you
You can see the process here:
More information here: Websockets

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?

Program to repeatedly get the contents of a webpage [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 wish to get the contents of a web page that requires me to be logged in (and one that I do not have control over: e.g. Twitter or Facebook), for example I can have Chrome running and I can see Ajax updating the page updating, but I want to periodically get the contents of this page and somehow save it. I don't mind leaving a computer running to achieve this...
You can use any http software to achieve this (like curl). Depending on the site it will take some investigation of how requests are made, in what order, the post data, the encryption, the user agent, cookies, headers, etc. etc.
It could take some time to find the right recipe.
Generally these sites don't want you to do this though, so don't be surprised when you run up against captcha or other clever methods from preventing exactly what you're trying to do.
Chances are, if you have to ask, you won't get in. But have fun.

Efficiently extracting webpage data into a data structure with JavaScript [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am new to JS and I am trying to figure out the most efficient way to perform this task.
Stack Exchange keeps a list of its member-sites at https://stackexchange.com/sites
What is the most efficient way to extract this data into a data-structure, like an array or dictionary in JavaScript?
It seems like all the stackexchange sites are built with the same framework. If you check in your console, you can see that a javascript object StackExchange is defined on any stackexchange site.
If you just want to scrape that link in your question, you can go there in your browser, and type this in your console: $('.gv-item-collapsed-wrapper h2').text()
That page already has jQuery loaded, which you can use to search through elements on the page. That code snippet will show you all the site titles in a string.
Better yet (but a little more complex)
var arr = [];
$('.gv-item-collapsed-wrapper h2').each(function(){arr.push($(this).text())});
I just tested a small portion of the sites, and this seems to work:
window["StackExchange"] !== undefined
If you look at the source of any page, there is always something like this:
StackExchange.ready(function () {
So basically you're checking to see if that class, StackExchange exists, and if it does, most likely (I'm sure in the masses of the internet, somebody is borrowing/stealing the code or using the same name) a StackExchange site.

AJAX Microgames [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're not familiar with the concept of a Microgame, check out this video of WarioWare Twisted.
I'm interested in setting up a site where users can play series of browser-based Microgames which are delivered to them by a server. Ideally this would allow me to crowdsource the games and have an open submission system. What sort of scheme could I use to make this work?
I'm thinking that one way to do it would be to have each game consist of:
A javascript file that defines a MicroGame object that controls a rectangular portion of the screen, gets input and timing information from the main page, then calls back to the main page with a "Success" or "Failure" message.
A folder of assets that must be downloaded before the game executes.
Is this possible to do, client-side within a browser? Where would be a good place to start figuring this out?
There are a lot of open issues here. The biggest problem is what language do they submit games in which you can execute safely on the players machines? That said, there are tools like this out there. You could look at the excellent Play My Code for inspiration.

Categories