Does Javascript Have A Stop() Method Like Java Applets?

Jul 23, 2005

A Java applet has two methods stop() and destroy() that get called when the user moves to a different page. Does javascript have anything similar?

View 2 Replies


ADVERTISEMENT

Why Do People Prefer Ajax Apps Over Java Applets?

Sep 21, 2006

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.

View 8 Replies View Related

Call A Java Method From Javascript

Jun 5, 2006

I am trying to call a java method from within my Javascript, but cannot
seem to get it to work. All the examples I have found online and in
the forums are using Java applets. I have a method that I want to call
that does a search, and produces a message dialog displaying the
results. Also, the class file lives next to the html file. How would
I invoke this in my code? This is what I have now:

<script>
function searchStrings(){
Searcher.search();
}
</script>
<form>
<input type="button" value="Search" onclick=searchStrings()>
</form>

View 2 Replies View Related

JQuery :: Stop Method Not Working?

Sep 17, 2010

It seems stop method is not working for me...I don't know what I am doing wrong, but when I mouseout when the mouseover animation is still running, the mouseout animation does not occur..

[Code]...

View 1 Replies View Related

Applets & New Windows

Feb 25, 2003

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.

<iframe height="25" marginwidth="0" width="450" scrolling="no" src="ticker/ticker.38253.stm" frameborder="0" marginheight="0">
<applet height="25" code="lightticker2.class" codebase="/java/" width="450">
</applet> </iframe>

View 1 Replies View Related

Javascript Using Java Methods

Jul 23, 2005

Can Java classes/objects be used from within the javascript code on the
HTML page? I.e., can I call a Java method from the javascript function?

View 2 Replies View Related

How To Pass Value From Javascript To Java In Jsp

Jul 23, 2005

in JSP, it's easy to pass value from java-variable to
javascript-variable, like

js_function(a)
{ a=<%java-class.A%>
}

I'm wondering how is the other way around? I tried

js_function(a)
{ <%java-class.A=%>a
}

but there was compiling error.

View 3 Replies View Related

DHTML, JAVA, JAVASCRIPT?

Apr 19, 2001

Is DHTML a language? or is it a composition of JavaScript and css? Does Java(not javascript) has something to do in it?

What is actually the best to create client-side dynamic pages?
I know JAVA is used to create applets but I am not sure of wich is the most powerful....

Also, wich are the newer versions of all the above languages?

View 15 Replies View Related

Java Vs Javascript For AJAX?

Jan 19, 2007

I am a XHTML/CSS developer with an interest in AJAX. I am at the stage were I wish to learn how it's all done.

So my quesiton is this:

To develop AJAX applications do I need to learn JAVA or Javascript?

It may sound like a dumb question considering AJAX is mainly javascript and XML, however will learning JAVA first off be a benefit?

View 4 Replies View Related

Script For Switching Between Two Applets

Jul 23, 2005

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.)

<applet name="cvcs" codebase="http://x.x.x.x:80/" code="xplug.class"
width=320 height=240</td>
<param name="RemotePort" value="80">
<param name="Timeout" value=5000>
<param name="RotateAngle" value=0>
<Param name="PreviewFrameRate" value=2>
<param name="DeviceserialNo" value="aGFyYm9yOm1hcmsxMjM=">
</applet>

Camera #2

<applet name="cvcs" codebase="http://x.x.x.x:81/" code="xplug.class"
width=320 height=240</td>
<param name="RemotePort" value="81">
<param name="Timeout" value=5000>
<param name="RotateAngle" value=0>
<Param name="PreviewFrameRate" value=2>
<param name="DeviceserialNo" value="aGFyYm9yMjptYXJrMTIz=">
</applet>

View 2 Replies View Related

Passing Arrays To Java From JavaScript

Jul 20, 2006

This may be more of a Java question, but I feel that JavaScript experts
may be more qualified to help me find a solution.

In short: is it possible to call a Java method from JavaScript, passing
as an argument a JavaScript array (in my case, an array of doubles)?

Supposing I have array x containing only doubles, I have tried:
document.MyApplet.myMethod(x);

But the method only ever seems to receive "null" as an argument.
Conversely, if I try this with a String, or a single character, or
almost anything else, there isn't a problem. Any ideas?

View 1 Replies View Related

Communication Between Java Applet And Javascript

Jul 20, 2005

let's me explains my long problem:

I'm doing an intranet with a media part. So im must be able to upload files on
a ftp server AND have a record of informations about this file and meta date in
a MySQL database, shown in a php page.

So the first thing i was doing was:

1/ * A HTML Form, with a <input type="file"> which was uploading the file to
the web server. And then, in the next action-php-page, using ftp functions from
php to upload to the ftp server. But this make upload the file 2 times, which
slow, and the user can't do anythig except waiting in front of a blanck loading
page.

=> no way

(BTW, the site admin refuse that the ftp server and the web server to be the
same computer)

So i tried something else:

2/ * A HTML form, the user enter meta data about the media, click next, and
then, a php page which loads a java applet an pass informations to it (by param
tags).
The applet have a browse button, and a go button, which start the transfert
(JDK 1.4.1) trough the URLConnection. The file is uploaded once, and there is a
progress bar, which is wonderful.

But now, i need the src_file information wich is the java applet. So i have two
options:

A/ I make a post to the webserver from the applet. But i'm using session
identification (needed for tracing users actions) and i'm gonna use SSL in less
than one month, so i think it would be complicated.

B/ I export the information from the java applet to javascript, and then to
HTML hidden field, so that the user can submit the full-hidden-filled form. But
i can't make LiveConnect works.

i'm under Mac OS X 10.2 (jaguar) so i need to make work LiveConnect on both
Safari 1.0 (v85.6), mozilla 1.5, and Mac OS IE (5.2).

View 2 Replies View Related

Calling A Java Class From Within Javascript

Aug 23, 2006

Can you call a java class from within a javascript?

View 1 Replies View Related

How To Execute An External Java Application By Javascript?

Jul 23, 2005

I am writing a java application as a mozilla extension.
Because mozilla uses javascript for the frontend,
i need the javascript to call my external java application
and pass one parameter to it.

View 1 Replies View Related

How To Set Default Homepage In Mozilla Using Java/JavaScript

Aug 23, 2006

Can anyone help me how to set default website as homepage in mozilla using java/ javascript.

Following javascripts code works in IE but not in Mozilla.

<input type="button" value="Set Default" onClick="this.style.behavior='url(#default#homepage)'
this.setHomePage('http://www.myDefaultWebsite.com')">

View 3 Replies View Related

Java Applet Verses JavaScript For Scrolling Text

Jun 24, 2002

I am looking at a client’s site that has a scrolling text bar at the bottom of the page for latest news. I have been asked to recommend whether they keep the scrolling text as a java applet or whether they make it dhtml with Javascript to make it scroll.

To be honest, I’m not sure whether there really is an important difference, in terms of download time, likelihood of working (if client browsers are better enabled for one verses the other), or whether there are any other reasons one should be used over the other.

View 2 Replies View Related

Javascript Stop Cache

Sep 13, 2003

How can I prevent an external javascript file from being cached?

View 11 Replies View Related

How Do I Stop Explorer Blocking My Javascript.

Feb 3, 2006

I am very new to this and have just written some code to randomly generate an image on my web page. Each time I test it, a bar at the top of the page comes up saying:

"To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options..."

How do I stop this coming up on other peoples computers, because if they don't click OK, they can't see my images? Is it my script that is causing an issue, or is there a simple fix for this?

Many thanks in advance for your help, and please remeber I am very new to all this, so try to explain in simple terms.

View 3 Replies View Related

How To Stop Javascript Dropdown Menu From Scrolling?

May 19, 2003

I'm trying to place a javascript pulldown menu in a layer at the top of my page.

Everything seemed to work great until I noticed the menu always stays visible as you scroll down the page.

How can I make this menu stay put exactly in the layer (yellow bar) and not scrolldown? Code:

View 5 Replies View Related

How Can We Stop IE From Executing Javascript On A Back Button Click

Nov 14, 2007

Basically, I have a page that I load with 10 input fields. If users
have JS enabled I want to hide 5 of these fields so as to reduce
clutter. If the user needs these extra fields an "Add" button can be
used to display the hidden fields one by one.

Once the fields a filled in the user submits them for validation and
if there are any error They can "Go back" to make some changes. The
whole process works great in FF & Opera but IE lets me down because if
you use the Browser "Back" button the Javavscript gets executed even
though it should be loaded out of cache.

View 3 Replies View Related

On Javascript Replace Method.

Jul 29, 2007

I don't think this is "do-able" but thought I'd better check. Say I
want to replace certain names in some source code as long as they are
not properties (dot properties) of objects. I could use a regular
expression like:

rx = /(?:(.)|)(?:name1|name2|name3)/g;

map = [];
map["name1"] = "a";
map["name2"] = "b";
map["name3"] = "c";

source = source.replace(rx, function ($0, $1) {return $1?
$0:map[$0]});

Dot properties like .name1 are not replaced by anything new and they
need to be "skipped" over by this regular expression but other name1
identifiers need replacement with "a".

One problem with this approach is that dot properties like .name1 are
replaced by themselves and this is just unnecessary work. Something
like a "false" return to skip replacement would be nice but the
following doesn't work.

source = source.replace(rx, function ($0, $1) {return $1?
false:map[$0]});

There are other ways to get around this by using something else
besides replace() but I wanted to see if it could be done with the
replace() method.

View 9 Replies View Related

Post Method With Javascript

Dec 1, 2005

i'd like to know if it's possible to send variables with the post method in a javascript instead of doing :

window.location.href = "page.php?var="+var;

using get method ! i'm asking this because i have many variables to pass and get method doesn't seem to be the best way !

View 4 Replies View Related

Javascript Window.status.visible Method In IE6

Jul 23, 2005

I am trying to determine whether the status bar is visible or not .. is
there a method to check the state? I did a google search and found
info re: window.status.visible but it returns undefined?! Has it been
deprecated?

View 2 Replies View Related

Javascript String Doesn't Have Trim Method ?

Jun 6, 2007

I was trying:

Code:

<script>
function testtrim(value) {
alert(value.trim());
}
testtrim("Alex ");
</script>

The javascript don't work, my firebugs says:[value.trim is not a function] how to simulate an trim function?

View 4 Replies View Related

Turning Form Actions On And Off With Javascript Or Some Tother Method

Oct 28, 2000

Does anybody know how to turn off form actions please?

I have 2 types of users (members and non-members) using the same form action. This form has 4 buttons in total.

If the user is a member they have full access to all buttons.

If the user is a non-member they can only use 2 of the 4 buttons.

So, at the moment, when they are non-members and click on one of the members buttons, an OnClick event handler is added to the input type = "submit", which generates a new window with a document explaining to the user that they need to register.

There is no problem generating this window.

The problem is that the form specified in the form action still executes and the members page is still displayed.

So is it possible to turn off the form action in this instance so that the main page isn't refreshed/executed, or do I have to create different form actions for different users.

Surely there must be a way to prevent the form action from being triggered?

I realise I could simply not display the button for non-members, but I'd prefer to do so, as it allows them to see the features that members receive.

View 3 Replies View Related

Trying To Use The GoTo Method Of The Word.Application ActiveX Object In JavaScript

Dec 11, 2006

I am trying to use the Goto method of the Word ActiveX object. I am
trying to open a document and go to a named bookmark. If I use this
code in VB it works, so I'm sure the approach is possible, I just can't
get JavaScript to work with it.

Here is the code I am using, the error I get from IE is Object
Expected:
Hope someone can help! Any help would be much appreciated

function PageLoad()
{
var WordApp = new ActiveXObject('Word.Application');
WordApp.Visible = true;
var documentlocation = crmForm.all.new_documentlocation.DataValue;
var wd = WordApp.Documents.Open(documentlocation);
wd.Select();
var Name = 'TestFred'
var wr = wd.Selection.GoTo(What : Word.WdGoToItem.wdGoToBookmark,Name :
'TestFred');
}

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved