From the common user perspective (like my grandma), why would they care
if its a java applet or an ajax application? Say I want to make a chat
system on my website...If i'm doing really involved Comet push-style
data communication, and rendering everything using DHTML, why would
users prefer that over a java applet?
Moreover, say I use a java applet to transfer data through a socket
connection, then use DHTML to display the data, so that basically the
front end is the same, but the backend is differs, why would a user
prefer the comet-style programming over applet?
I'm asking because I wrote an Ajax chat system through polling, and I
want to switch to a Comet push-style system because polling just isn't
responsive enough. I want to know if I can avoid Comet (since it is
alot of overhead for the server) and just use an applet in the
background to transfer data through socket connections, then use DHTML
to render the chat boxes.
On this page I'm given the impression that stopPropagation is a lot like returning false:
http://www.brainjar.com/dhtml/events/default3.asp
"preventDefault() Can be used to cancel the event, if it is cancelable. This prevents the browser from performing any default action for the event, such as loading a URL when a hypertext link is clicked. Note that the event will continue propagating along the normal event flow.preventDefault() Can be used to cancel the event, if it is cancelable. This prevents the browser from performing any default action for the event, such as loading a URL when a hypertext link is clicked. Note that the event will continue propagating along the normal event flow."
But often, if I want to stop a hyperlink from working normally, I can simply return false from whatever action I've attached to that hyperlink. Suppose I have this link:
<a id="link1" href="index.htm">link text</a>
Suppose I attach the function "alertDanger" to this link:
function alertDanger() { alert("Danger!"); return false; }
Because I return false, the default behavior doesn't occur. Would there ever be a benefit to doing this instead:
function alertDanger() { alert("Danger!"); preventDefault(); }
Perhaps preventDefault is only for those occassions when the code can not or should not return?
I've got this script below which works perfectly but I was wondering if there was any way to get it to open in a new window when someone clicks on a story? I've tried putting in target="new" in the iframe code but that doesn't work.
I have 2 web cameras that are displayed in my html page by two different applets. I did not write the appletts, I just put them into the web page.
Question 1: Is there a way to have this image on the page change from one camera to the other every 15 seconds? Question 2: Is there a way to have the cameras only appear during a certain time of the day and have a jpg appear the rest of the time - i.e. daylight hours?
Camera #1 (I altered the actual link to the cameras.)
The portable versions of Firefox, Thunderbird and Sunbird for use with USB drives seems like a great idea and one I could make a helluva lot of use of at work - but before I drive down that particular road, does anyone know how good / bad / indifferent the implementation of Javascript is on these apps? Code:
I have a web application that has a few div tags in the base index.html and calls a java app for the output to the div tags. All is working ok, except when I try to format a ms-excel document as output from the java (to the div tag). If I invoke the java app directly in a web browser, the excel popup window comes up and my output goes to an excel document. However, if I invoke the java app (using Ajax request/response) I get the output to the div tag and the excel popup does not come up. Is this something special/different I need to do when using a div tag/Ajax?
I'm poking at a small "single page application" (SPA), ala TiddlyWiki, to act as kind of a local, single-user version of Twitter (no real application, except to familiarize myself with JavaScript). Right now I'm using a hidden field to hold JSON, which is currently my flat-file database of posts.
Is there a better way to store JSON data in a SPA other than hidden fields? I'm Googling now to allay or confirm my concerns, but I'm worried that there may be some upper limit to how much data you can cram in the value of one.
I'm using JSON mostly because (a) I really prefer it to XML in JavaScript applications, (b) it seems (key word, "seems") smart to separate my post data from posts (so I can show n-number of posts at a time), and (c) I really dislike parsing XML in JavaScript when JSON seems like a viable alternative. (Though, given my size/space if JSON isn't going to work, I'm not averse to using XML.)
For a calendar project implemented with pure HTML/CSS/JS I need to access local data files (.ICS). These ICS/iCal data has to be accessed also by other applications (eg. sync, backup, etc).Can anyone point to a possible solution to use HTML5 compatible calls (or jQ plugin) AND how to access the localStorage files also from the other apps.
Notice: This is a discussion thread for comments about the SitePoint article, A New Window on HTML-Based Adobe AIR Apps.Contest ended early? After submitting the quiz, it says it's over already - not supposed to expire until the 5th, right?
I'd like to be able to get the address of people accessing my site. I don't need their actual house address, just a general area like zip code or city/state/country. Is something like this possible? I know you can do this in php.
I wondered if anyone knew of any statistics about how many people have Javascript enabled/disabled. Also, what sort of policies do IT departments have towards it. I know of at least two large organisations that have Flash disabled for instance.
i want the browser to test wether or not a page that is called is beieng called from within the specified window the script is originally used to prevent a page within a frame to be called alone it redirected the user to the main window if i can call it that so that parts of your frames could not be viewed alone
i have managed to secure most of my site no rightclicks can be performed and no options to view source code by using a chromeless window the problem now is that i wanna make sure that someone cannot call a page into a normal browser window by using shift while clicking on links thus preventing anyone from getting to my source code.
I'm try to hide the title of some links on a web page. I'm using the title property of some links to pass a description of the images linked to a lightbox script. These descriptions are long and formatted in HTML so I don't want them displaying when people put there mouse over the links.
I'm developing very advanced web-based intranet application that uses a lot of very complex JavaScript for interface, including charting via ActiveX components and other processing.
Obviously I'm tempted to make the analysis of the javascript code very hard for people who may wish to steal my code and/or ideas.
Is there is anything I can do to make analysis of .js code difficult for *professionsals*?
I'm trying to allow people to download music files, from my web site server, to their desk top, by clicking a button. I don't know if I need html or some kind of script. The page already plays short music clips automaticly with a simple "onload" script I found somewhere--but I don't know how to get the viewer a copy of the music for their mp3 player or disk burner.
I'm creating a PHP script that will use the pagination to display what people have written. This will can get fairly lengthy and I was wondering what is the best way to develop my php script to be fast and effective. I'm scared that if I output an entire query of all of the data that it will be slow. Would it? Could it slow down the javascript?
I want to disable ALT+TAB key combination on my webpage to avoid people using any other application while using my application while working on my website.
I have this script, where I want it to use a multi-user login. the code is below.
[Code]...
I have 2 problems. One is that mainly, it doesn't work! And Two, is there someway you can block an external script from being viewed in a browser, or someway to keep people from reading the Usernames and Passwords?
show images after people scroll down the page - don't load them immediately after the page is loaded.also the images which are below the scroll should be first loaded when an user scrolls down.i need a javascript for that, but i don't want jquery! the code should be as short as possible.
I am trying to find the answer of the following. Suppose, I am trying to build a web page to conduct a fictious online Poll and people vote their favourite candidate. Now each voter is allowed to vote only one candidate from any one party. I have made the code with JavaScript and HTML. But the problem is that, after voting the Candidate and pressing Submit, the page should open another new page where the voter must select any one name of the party to which the candidate belongs and Submit again. But my problem is that, I am trying to open that new page in the place of the existing page but its only opening in a new window. Putting '_self' doesn't work! (I am using radio buttons. It also needs form vaildation so the voter must vote!)
<HTML>
Use any html file of yours as party_names.html. If you omit "_self" from it, then it'll work properly. But that opens a new window for party_names.html. But I want it to open the new page in the same window carrying the data selected from both pages in order to process in the server.
I have very intense php script that takes from 5 - 30 seconds to execute, depending on user request. So I want to prevent people from clicking "search" twice, so I decided to glue it by disabling button on click. Here is my code:
[Code]...
But, for some reason it won't proceed. JS executes fine, but form won't go on. What is wrong?