What is the best way to get the client time to the server? Would I user http headers? (I dont know how to do that) or is ajax the best method? I could use ajax to send the unix timestamp to the server everytime a page loads and save the difference between it and the server timestamp as a session variable. sounds sensible?
I dont want to work with timezones but I do want to get the actual time set on the client's computer.
So let's say there is a file with a date/time of 07/15/2004 1:15 PM in central time zone and the client is viewing the file today in pacific time zone (2 hrs diff.). I need to show that date/time as 07/15/2004 11:15 AM. I need JS to take གྷ/15/2004 1:15 PM' and somehow convert it to གྷ/15/2004 11:15 AM'. Code:
I want to create a decent log at clients side to show alerts from server.
So, server should be able to see a list of connected clients (registered user) on the website, and select a few of them, type something in textbox, clicks send to all of selected clients, and the message is shown in the log at client's website. Also plays a simple sound file when clients receive new message in the log.
The only way i can think of doing such a thing is having an active server page that returns an image, that is generated on the fly. As long as there is no caching on the client this in theory will allow the client to perform an action on the server and display an image generated on the fly as a result of this action without actually reloading the page, simply by requesting an image.
I am developing an ASP.NET (C#) application and need some help. I wish to call a server-side function (in the code-behind "file.aspx.cs") upon a user clicking on the "X" to close the browser window. Is there a way to postback and call a server-side function when this happens? I am aware of the browser's native "onunload" event, but am not certain that what I'm looking for is actually possible.
I'm trying to implement a simple chatting website. For now what the code does is checking every 10 seconds if there are new posts stored in the database (newer than the last check, 10 seconds ago). Is there a more efficient way than doing this with a timer??? for example, is there some kind of event listener attached to the server that would notify the client whenever the db is updated?
Is it somehow possible to setup a backend server to send a message to a client? Or it is a client always have to establish a connection? What I'm trying to code is a simple chat script that sends a message to the client once a member of the chatroom has logged out. The only way that I can make this work is if the client either sends a message (which is a POST call) or when a time delay occurs (I've set a timer to run every 30s after the last GET or POST call). But both of these are basically CLIENT -> SERVER calls. I don't assume that the other way (SERVER -> CLIENT) is possible? no?
1. http:www.uploadify.com/ 2. http:valums.com/ajax-upload/ Which related with upload file.
I a bit confuse on What different between Applet and Plugin? How the file can send from the client PC to the server? By the way, do DIC have the sample source for this? If no let me do it for the new one here.
My login to the site is being processed using ajax, which does a redirect to the members page upon succesfull loggin in.The login feature however can in fact take a while because we need to initialise quite some data when a user logs in (his details, but also his privileges are loaded, his personal menu based on these privileges are being loaded, we are loading shopping cart info, we are initialising personalisation settings, and a whole lot more.It sounds like a big thing, but it isn't, and once logged in, the application is going great. the only thing is that the login proceure can take 3 - 4 seconds, and I would like to be able to show the client the progress of the serverside script:
"Searching your account..." "Validating your privileges" "Initialising your personal menu" blablabla...
To do this, I might just call an ajax call that starts the login procedure, and then issue another ajax call every 1 second or so to update the status based on some session variables I set in the login procedure and that I can serve to the client when th next ajax calls come in, but I would love for this to work a little nicer as in just needing to initialise ONE ajax call which can send back statusupdates from the server...
What would be nice is if my browser could continually query the server for some of its private information and not have to refresh itself to obtain it, whether that means the server-side would have to continually refresh itself makes no difference to me as long as the client-side doesn't have to. But I guess this is not possible because no matter what you would have to at least refresh the client-side page once?Submitting the form to a CGI or PHP script would not work because I need this functionality to help populate the form BEFORE I send it.I would like to not have to press a button to update the form every time I change the pathname and need to update the drop downs since this would be annoying.
I am using jquery to send an ajax request from my facebook app which is in iframe to my server. The ajax request works fine when the web app is running stand alone and out of facebook platform, but within facebook, the result that I get from my ajax request is blank !!! Here is the code I use:
I built a pretty simple Ajax request which needs to send some data to the server and put the resulting HTML in a div. Unforunately, I need to POST the data. I used .post() and it worked fine ... *on Chrome and Opera!* ... on Firefox no data gets posted even though firebug shows the data in it's console. I ended up building the longest possible request, just to try all the options. No luck. As soon as I POST anything, Firefox won't receive the data. If this was a Firefox issue, wouldn't I read about it everywhere? What's wrong?