Sponsored Content
Full Discussion: Need help with Javascript
Top Forums Programming Need help with Javascript Post 302461084 by kicker75 on Friday 8th of October 2010 12:20:02 PM
Old 10-08-2010
Need help with Javascript

Hi guys,

Ok first, let me explain what I want to do. I'm making a theme for the iphone, and I found a nice wallpaper slideshow script. Here is how it knows which wallpapers to use:

[code]
<script type="text/javascript">
// SLIDE ROTATION FREQUENCY (in minutes)
var slideRotation = 0.4;
// SLIDES - they can point to any location on your phone, or a url on the internet
// image - The location of the image to display, such as a location on your phone
// or a url on the internet.
// zoom - The starting level of zoom.
// origin - Use this property to change the starting origin of the zoom. The origin
// is expressed as a percentage of the size of the element (x and y). For
// example, the default value 50% 50% causes the zoom to start at the center
// of the slide. Changing the origin to 100% 0% causes transformation to
// occur around the top-right corner of the slide, etc.
var slide = [
{ image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper13.png", zoom: "100%", origin: "53% 20%" }, { image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper1.png", origin: "53% 28%" }, { image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper2.png", origin: "53% 20%" }, { image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper3.png", origin: "53% 20%" }, { image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper4.png", origin: "53% 20%" }, { image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper5.png", origin: "53% 20%" },
{ image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper6.png", origin: "0% 40%" },
{ image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper7.png", origin: "85% 5%" }, { image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper8.png", origin: "85% 5%" }, { image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper9.png", origin: "85% 5%" },
{ image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper11.png", origin: "53% 20%" },
{ image: "/Library/Themes/iMatte UI.theme/slides/Wallpaper12.png", origin: "84% 23%" },
];
</script>
[/code]

Would there be a way of telling it to look in a specific directory and use all, let say, Wallpaper*.png and build the variable array with it? And maybe have random origin values? So they are all coming from a different angle?

Thanks, I would really appreciate if that could be made possible!

Last edited by vbe; 10-08-2010 at 01:52 PM.. Reason: code tags maybe not a good idea...
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Javascript: Edit a script ?

Hi, i got this script but when i hit reset i loose the times in the form box. Can someone please edit this script so when i hit reset i dont loose the times in the form box's and also have a button to reset everything, including the form boxs <script language="javascript"> // stopwatch... (1 Reply)
Discussion started by: perleo
1 Replies

2. UNIX for Dummies Questions & Answers

javascript onClick help

I have two radio buttons with corresponding text boxes for input, when one is chosen I am disabling the text box for the other, is there a way to "gray out" the disabled text box using background-color or something? Any help is greatly appreciated, right now my onClick looks like this: ... (1 Reply)
Discussion started by: k@ssidy
1 Replies

3. Shell Programming and Scripting

javascript injection

Please advise a script to get rid of the following code which is infected in a large number of files ( in particular php and html files ) <div id="testws35fdgh"></div> <script language="JavaScript"> var0 = "\x69\x3c\x33\x27\x34\x38\x30\x75\x3b\x34"; var1 =... (20 Replies)
Discussion started by: fed.linuxgossip
20 Replies

4. Web Development

Javascript -> Shell Script

Hi all, I am trying to call a shell script from a javascript function. This works fine and the shell script returns everything I expected BUT I cannot figure out how to pass command line arguments to this shell script. Using GET, I assume the url being called needs to be one string with no... (7 Replies)
Discussion started by: mark007
7 Replies

5. Web Development

Sortable Tables in Javascript

Hi, I am writing a web application using Perl-CgI mostly. I wanted to integrate a table in which I was capable of sorting columns and I don't think this is possible with static HTML code. Can someone help me integrating some javascript code into what I have to acheive the above? Regards,... (6 Replies)
Discussion started by: garric
6 Replies

6. Web Development

Javascript Problems in Opera 10

Ref earlier post: https://www.unix.com/web-programming-web-2-0-mashups/118283-opera-10-0-released-looks-nice.html I have noticed that Google Docs, Speadsheets does not work properly in Opera 10. Anyone else seen the same thing? (1 Reply)
Discussion started by: Neo
1 Replies

7. Programming

Help in javascript

Hi , I wanted to know if its possible to execute a javascript function like this E:- function js1(){ alert ("this is js1"); } function js2(){ alert ("this is js2"); } function js3(){ .... execthisscript(js1); execthisscript(js2); } ... (1 Reply)
Discussion started by: daptal
1 Replies

8. Shell Programming and Scripting

want to use javascript as shell script

<html> <head> <title>Weather & Aviation Page - METAR decoder</title> <meta name="Title" content="Weather & Aviation Page - METAR decoder"> <meta name="Keywords" content="METAR decoder"> <meta name="Publisher" content="SkyStef"> <meta name="Description" content="SkyStefs weather and aviation... (4 Replies)
Discussion started by: anuajay1988
4 Replies
LaTeX::Table::Themes::Classic(3pm)			User Contributed Perl Documentation			LaTeX::Table::Themes::Classic(3pm)

NAME
LaTeX::Table::Themes::Classic - Classic LaTeX table themes. PROVIDES
This module provides following themes: plain Animal Description Price Gnu stuffed 92.59 Emu stuffed 33.33 Miami Animal Description Price ---------------------------------- Gnu stuffed 92.59 Emu stuffed 33.33 Berlin +--------+-------------+--------+ | Animal | Description | Price | +========+=============+========+ | Gnu | stuffed | 92.59 | | Emu | stuffed | 33.33 | +--------+-------------+--------+ Dresden +--------++-------------+--------+ | Animal || Description | Price | +========++=============+========+ | Gnu || stuffed | 92.59 | | Emu || stuffed | 33.33 | +--------++-------------+--------+ Houston +--------++-------------+--------+ | Animal || Description | Price | +========++=============+========+ | Gnu || stuffed | 92.59 | +--------++-------------+--------+ | Emu || stuffed | 33.33 | +--------++-------------+--------+ Except for "plain", headers are printed in bold font. REQUIRES
The themes defined in this module require no additional LaTeX packages. NOTES
These are the classic themes you know from the famous books and tutorials. However, they have flaws. Read the "booktabs" documentation for a discussion of this. The "plain" theme might be useful in combination with the ltpretty script. SEE ALSO
LaTeX::Table, LaTeX::Table::Themes::ThemeI LICENSE AND COPYRIGHT
Copyright (c) 2006-2010 "<limaone@cpan.org>" This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. perl v5.10.1 2010-10-27 LaTeX::Table::Themes::Classic(3pm)
All times are GMT -4. The time now is 07:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy