Implement Comet Server ?
Sep 29, 2011
I have gone through the basic techniques to implement comet server like streamhub,Maven/Jetty etc. I have following questions for that :
After that I found the issues like in case of Maven/Jetty internet connection is required for downloading certain files from net.So it it possible to implement it if no internet connection is there on machine where the web server is hosted ?
Also I want the open source tools/technologies to achieve the thing mentioned in the above question. and I think stream hub is not a open source free version. which is free/open source to use.
Currently the web application is running on apache web server. so if I use comet server what changes I need to do in that ?
View 2 Replies
ADVERTISEMENT
Sep 21, 2006
I want to make a chat system using the Comet push-style technology. I
already wrote a poll-based one using Ajax, but I want to learn how to
do server-pushes. Does anyone know of a good website that can show me
how to do this? Or recommend a good library/framework to use?
View 1 Replies
View Related
Nov 15, 2011
I've been reading a lot about Comet and I've been interested in implementing it. It doesn't sound that difficult, but I have yet to find concrete examples of what it is, so I don't know how to actually use it.
I've seen some examples where new ajax requests are made as soon as old ones are complet but this doesn't make any sense to me. It seems this method is a complete resource bandit.
For example, how do I open a long-lived HTTP request? If the request is long-lived, when does the callback get actually called - at the very end of the request (status == 200 and readyState == 4) or can I call it intermittently to download new data while my PHP script is in sleep()-ing?
View 1 Replies
View Related
Oct 2, 2010
I have the following JavaScript (see below). The script requests an XML file from the server and displays it on the page.
The script works fine when the requested XML file is stored on the same server as the script.
The problem is when I try requesting an XML file from an external server such as the National Weather Service. I get an error. If I take the XML file from the National Weather Service and save it to my server it works. Why can't I use my script to request XML files stored on external servers?
Javascript Code
window.onload = initAll;
var xhr = false;
function initAll() {
document.getElementById("makeTextRequest").onclick = getNewFile;
[Code]....
View 8 Replies
View Related
Mar 11, 2010
I'm trying to write a script that will be loaded from one server into a website on another server. This script is trying to talk (ajax) to the server that it comes from but I'm getting "Access Denied" errors. I'm well aware that cross-domain calls are not allowed for security reasons so my question is how does Google Analytics work because essentially thats what I'm trying to accomplish. I can embed a Google Analytics script into my website and it'll gather data and send it back to Google.
View 4 Replies
View Related
Apr 19, 2010
I'd been looking for some way to get server date/time without using any server side script (such as ASP, PHP, etc).
I found this and it worked just excellent for me! I just want to share it because it wasn't easy to find.
I created a js document with code:
Code:
Now, I can use this js within a html like this:
HTML Code:
You may change your machine date/time and check both dates.
View 1 Replies
View Related
Feb 10, 2010
I would like to open an html file locally (not fetch it from a server) and somehow use javascript to fetch the relative resources from the server. One solution would be to convert all of the relative links to absolute links. I can convert the html source file anyway I wish, but ideally I would like to modify the html source as little as possible, for example insert a function that modifies the result of the src attribute. How would I go about this? Is there any trick I can use to define where the relative home is? Am I going to get into any scripting security gotchas?
View 3 Replies
View Related
Dec 31, 2006
I am creating an XML document on my page with javascript. My question
is, is it possible to save that xml file on the server (I have write
permissions) only using javascript, ie no server code? This task would
be trivial using server code, but I was wondering if I can do it all
with client code and post backs? Well, any input?
View 1 Replies
View Related
Dec 7, 2010
I already have a server connected to clients, clients send msgs and it echoes back to all of them and now i want when a client sends a msg it echoes on his server and the other server too .. so when any of the clients on any of the servers sends a msg it is broadcasted all over the servers to all clients
[Code]...
View 1 Replies
View Related
Jun 24, 2010
In ASP.Net, I am trying to create a WebControl. In this control, I have RenderControl method overridden with my html controls.
protected override void RenderContents(HtmlTextWriter output)
{
output.Write(@"<table><tr><td>");
[code]....
How can I make the button call the click event so that the server side method btnExecute_Click() can be called? Also, this button calls a javascript function before server side even.
View 5 Replies
View Related
May 23, 2011
I need to implement more than one gallery on a page, and the current script only allows one gallery. how to change the script to allow more than one gallery on a page?
Here's a copy of the script:
<script type="text/javascript" src="jquery/jquery-1.4.1.js"></script>
<script type="text/javascript">
var currentImage;
[code]....
View 5 Replies
View Related
Jul 25, 2011
I have written a javascript slideshow with pause-play-next-previous buttons, but the images are too many and users have to wait too long especially with slower connections - i wonder if anybody can suggest a way to implement the script with fast preloading of the first few images, increment preloading or a similar trick. I will copy my code below but i also copy first this link:
[URL]
which is an example of increment loading slideshow working fine! javascript and i wouldnt know how to customize it in order to take away the link function, that i dont need, and add captions and buttons etc.
I do know some jquery plugin could do but i am trying to go more into the code, even though i still need a lot of advices and tutorials, the goal is solving this specific problem but also learning! Thx a lot in advance.
Here my code (just 2 images here in the list to make it shorter for you, the complete list is more than 50 pics!):
<script language="JavaScript">
<!--
var interval = 8000;
var random_display = 0;
var imageDir = "portraits/";
[Code].....
View 9 Replies
View Related
Jan 26, 2011
I currently want to implement an overlay and a dialog the same way its used for this sites login .
View 1 Replies
View Related
Apr 27, 2010
I want to implement the "Font2Bmp" application on my page. Font2BMP may be driven by the command line. All values must be enclosed in quotes or other matching character. (See /Input) Available options are: ...
My purpose : you give in a text, choose a font and when you hit the "Make" button, the application will be executed. The result has to appears on another page (or the same).
View 4 Replies
View Related
Apr 1, 2010
I am very new to Javascript and am having some difficulties with implementing two forms on the same page. The page in question is [URL]. The form at the top appears on every page and works on all of the other pages except this one. When you try to complete the form it validates the second form on the page. The code for the top form can be found here: [URL] (it is an include file). The two scripts that I am using are as follows:
Top Form: [URL]
Contact Page Form: [URL]
View 2 Replies
View Related
Jul 23, 2005
How to implement mm/dd/yyyy format for textbox?
I have text box with format mm/dd/yyyy. Now I want the cursor i
generated whenever user highlight this textbox and whatever user inpu
replace one of char in "mm/dd/yyyy" one at a time.
View 6 Replies
View Related
Dec 8, 2005
Our project has thousands of web pages.
We have certain default chores we would like to occur as part of the
onload handling for all of these pages.
Rather than modify every page to say
window.attachEvent("onload",defaultChores);
is there some neat way to perhaps tap into the page-loading process so
that the above attachEvent call gets performed implicitly ?
Perhaps this involves some sort of server intervention. That is a
possibility for us, as we have access to the server as well (it's
typically a tomcat server), although admittedly if this is the only way
to do this, then this discussion should quickly migrate out of the
javascript newsgroup and into some sort of web server one.
View 1 Replies
View Related
Mar 18, 2010
I want to implement the jQuery GUID Helper plugin into my web app but I don't know what's the "best practice" method of incorporating it into my code.I'm basically creating a cart system from scratch (figured it was asufficientlycomplicated system to use when learning jQuery). When the visitor first adds an item to their cart is when I wanted to create the GUID for the visitor. I have a cart-handler.js script that I link to from the item view page:
<script type="text/javascript" src="/js/cart-handler.js"></script>
That script's first line is my$(document).ready(function(){ and the script handles AJAX calls to loading the data into cart record in my MySQL database, updates the cart total on the items page, and changes the button from "Add Item" to "Update Quantity".So would I need to link to the jquery.Guid.js script right from the view items file for my item view page? Or can I reference the plugin from the cart-handler.js file?
View 1 Replies
View Related
Jun 11, 2010
I am replacing a simple click function with the mousehold function using the mousehold plugin. For some reason it is not working.
$(
window
).load(
function(){
$(
document
).click(
function(){
$(
document
).mousehold(
200,
function(){
//Do somethoing here each time the Timeout Occurs
}});});
//End Window Load Function
[URL]
View 2 Replies
View Related
Jul 15, 2009
I am trying to do something like this.if a button is clicked call one function
$('.saveButton').click(function(){
////call one function
});
else call another function. how to implement if else in a clicked event.
View 2 Replies
View Related
May 21, 2010
I am trying to implement a version of the datepicker. However, I would like the calendar to open in a modal dialog box rather than sliding open next to the text box.This is the closest example I've been able to find, but there are a few issues - I would like the user to click on the text box to change the input, and obviously the small input box in the corner of the calendar is a problem...
[URL]
View 1 Replies
View Related
Jul 1, 2010
I can write the most basic codes but even then it really doesn't make sense. On my website I am trying to implement a JavaScript slideshow from this website: [URL]. I do everything as it says, but the images don't even show up. Here is a link to my website where the problem is, you can view the source to see my xhtml code (please note my site isn't even close to being done.): [URL]. The slideshow should be showing up in a right next to where it says "Design is our Passion."
Here is the code for the slideshow which the site I got the script said to do:
<div id="slider">
<img src="Assets/slideshow_assets/stereosound.jpg" alt="" title="Business Card design for StereoSound." />
<img src="Assets/slideshow_assets/triflex.jpg" alt="" title="Logo design for TriFlex Labs." />
</div>
Here are both of the CSS files that the slideshow uses:
nivo-slider.css:
/*
* jQuery Nivo Slider v2.0
* [URL]
*
* Copyright 2010, Gilbert Pellegrom
* Free to use and abuse under the MIT license.
* [URL]
*
* March 2010
*/
/* The Nivo Slider styles */
.nivoSlider {
position:relative;
}
.nivoSlider img {
position:absolute;
top:0px;
left:0px;
} .....
View 7 Replies
View Related
Nov 23, 2010
I have a main window which produces a number of child windows when I press a button. Users need to be able to switch between windows using Ctrl+Tab hot key. I was trying to implement this by intercepting keyup/keydown events in one of the frames. But the problem is that main window has several frames and I don't have access to all of them because some of them are in different domains. As soon as a user clicks on a frame without my handler the hot key is not working anymore. how to implement it? Maybe an ActiveX component? If ActiveX could help me - how does it work? how to write an activeX to intercepts hot keys in IE?
View 3 Replies
View Related
Jan 3, 2011
I need to implement a function called map (it needs to be written using reduce) in the below code that takes an array (arr) and a function (iter) as its arguments and returns an array with all its items transformed by iter, e.g. map([1, 2, 3, 4, 5], function(x) {return x * 2;}) should return [2, 4, 6, 8, 10]
View 6 Replies
View Related
Oct 5, 2007
I code with javascript in ruby on rails. So I need to switch between localhost and my website. So the domain changes every time. What can I do, so that javascript grabs the root domain, so, lets say: Code:
View 2 Replies
View Related
May 7, 2010
I have a theoretical question, I can't really post my code. But I have four results from reads to a database using php. I then read from an xml file using javascript using a loop. I am basically creating a chart of four variables with several different values for each variable. Some of the values for each variables come from the database using php, and some come straight off the XML file parsing done by the javascript. I initially had the php fetch/extract inside of the javascript loop, but it only assigned the first variables values to all the other variables. I discovered (after hours of googling) the difference between client side and server side code. So, after all this typing, my question is where should I look for tutorials on using Ajax to be able to use php code inside of a javascript loop? (If at all possible)
View 2 Replies
View Related