Tagged Questions
121
votes
4answers
100k views
Scroll to bottom of div?
I am creating an ajax chat in rails and I am trying to get a div to scroll to the bottom without much luck.
I am wrapping everything in this div:
#scroll {
height:400px;
overflow:scroll;
}
...
114
votes
13answers
6k views
Why is it a bad practice to return generated HTML instead of JSON? Or is it?
It is quite easy to load HTML content from your custom URLs/Web services using JQuery or any other similar framework. I've used this approach many times and till now and found the performance ...
73
votes
12answers
2k views
Update the CSS of a Website without refreshing the Page
I create a page with CSS. So I must change from my editor to my browser and must refresh the full page to have a look at every little change. But I don't want to refresh the page, because I have some ...
36
votes
5answers
12k views
Is there a best practice for generating html with javascript
I'm calling a web service that returns an array of objects in JSON.
I want to take those objects and populate a div with html. Let's say each object contains a url and a name.
If i wanted to ...
34
votes
4answers
32k views
how to use jQuery ajax calls with node.js
This is similar to Stream data with Node.js, but I don't feel that question was answered sufficiently.
I'm trying to use a jQuery ajax call (get, load, getJSON) to transfer data between a page and a ...
30
votes
5answers
64k views
Changing CSS Values with Javascript
It's easy to set inline CSS values with javascript. If I want to change the width and I have html like this:
<div style="width: 10px"></div>
All I need to do is:
...
25
votes
4answers
4k views
How can you make a vote-up-down button like in Stackoverflow?
Problems
how to make an Ajax buttons (upward and downward arrows) such that the number can increase or decrease
how to save the action af an user to an variable NumberOfVotesOfQuestionID
I am not ...
25
votes
6answers
6k views
Creating HTML: PHP server-side vs. jQuery client-side
This is a design question. I have data that needs to go into an HTML table, which will later be manipulated by the user. Basically the user will be able to select items in the table rows.
I have two ...
22
votes
3answers
18k views
Stream data with Node.js
I want to know if it is possible to stream data from the server to the client with Node.js. From what I can understand all over the internet is that this has to be possible, yet I fail to find a ...
22
votes
8answers
6k views
ajax html vs xml/json responses - perfomance or other reasons
I've got a fairly ajax heavy site and some 3k html formatted pages are inserted into the DOM from ajax requests.
What I have been doing is taking the html responses and just inserting the whole thing ...
20
votes
10answers
10k views
AJAX and the Browser Back Button
I run a browser based game at www.darknovagames.com. Recently, I've been working on reformatting the site with CSS, trying to get all of its pages to verify according to the HTML standard.
I've been ...
20
votes
6answers
3k views
How do I abort image <img> load requests without using window.stop()
I have a very long page that dynamically loads images as users scroll through.
However, if a user quickly scrolls away from a certain part of the page, I don't want the images to continue loading in ...
17
votes
8answers
12k views
Are there any GUI toolkits built on top of HTML Canvas like swing,swt,gtk or qt?
Are there any GUI toolkits built on top of HTML Canvas like swing,swt,gtk or qt? So that it is possible to build applications like applets or flex gui:s inside the html canvas.
16
votes
5answers
16k views
Set timeout for ajax (jQuery)
$.ajax({
url: "test.html",
error: function(){
//do something
}
success: function(){
//do something
}
});
Sometimes success function works good, sometimes not.
...
16
votes
2answers
44k views
HTML - Change\Update page contents without refreshing\reloading the page
i get the data from DB and display it in a div... what i want to do is when i click a link it should change the content of the div
one option is to pass parameter through URL to itself and reload the ...