Here is a script I found which works well for randomly selecting a static image when loading/refreshing a page, and allows captions for the images. I need this to also have the images link to other pages. I lack the javascript ability to do so.
Code:
<!DOCTYPE -don't forget to use one of these!
<head>
<title></title>
I have a page on which a random image loads. Each image needs an accompanying image map to take you to the appropriate link. How do I make the appropriate image map links load? Here is my code so far, which works fine.
myStrip = new Array("images/hstrip_1.jpg","images/hstrip_2.jpg"); imgCt = myStrip.length;
function chooseStrip() { if (document.images) { randomNum = Math.floor((Math.random() * imgCt)); document.strip.src = myStrip[randomNum]; } }
What I have is a site with about 10 pictures, each of these pictures needs to be randomly pulled from folders, each picture slot will have its own folder, due to it being categorized. When the picture is clicked i need it to open a new page with the document associated to the picture. Is there a way to do this without having to rewrite the code every time? Because as there are new documents added at the end of each week.Unfortunately the server I use doesn't support PHP, but if it has to be done in PHP I can switch.Like I said though I haven't messed around with web design in a long time
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?
I need a java bookmarklet that does a real simple thing. I need to take the current URL (ie, where the user is when they click the bookmarklet) and append it to a static URL and return the text on the resulting page.For example:
The user is at http:[url]....
The user clicks the bookmarklet.
the bookmarklet takes http:[url].... and appends it to http:[url]... HERE where you see the URL HERE text.That PHP script echos a simple line of text (a shortened URL actually).Then I want that result from the outside_create.php file to be displayed in a window back to the user.Is this even possible? Basically I need to know how to append location.href to a static URL and how to get the resulting content from the static URL..
I am a newbie to Java Script. I am trying to convert a Flash Website back to an HTML, JS and PHP website. Naturally they want the site to look the same if possible. In the Flash version they have a contact section which has two choices: Phone or Email Below these choices is an Graphic Image ( by default the image for contacting by phone is showing ) If one clicks the E-mail choice then this default image, then spins around and changes to the E-mail contact image. It's like the Phone and Email Text options are hyperlinks which activate the image rollover. But after the image rollsover, then to actually send and email inquiry you have to click on this new Email Graphic Image. It's kind of a spinning rollover / mouse over affect.
Except after the rollover the image is now static and one can click on the Email Address to affect the Website Inquiry Email Window. Yeah, I know its overkill, why not just click on the link, but it's not my choice, the client wants it that way. He designed it for free on Wix now finds it does not work on iPhone, etc. Is it possible to implement this in Java Script?
I have a script which I grabbed from here: [URL] It does partially what I want but I need more functionality, specifically,
1) add caption text below each image in the form of "1 of 5, 2 of 5, etc." 2) make the current image clickable to go to respective URL of my choice
I have a rough mockup here: [URL] My question is, does anyone know of a script that already does all this? It needs to play friendly with all major browsers. I'm not a JS programmer, but can dabble with small changes if shown what's needed to modify this script.
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?
This script produces 5 random images and works lika a dream. Im trying to figure out how to create links for each of the five rotating images, so the link would also rotate and reflect the new image? Code:
I now have the following script to generate a randomised listening test for students (I've removed some of the more elaborate features for the purpose of this thread).
Code:
<html> <head> </style>
[code]....
One thing that I have just now noticed (dunno how I missed it before) is that clicking on the link generates a new random link each time it is clicked. What I would really like is for people to be able to hear the same sound as many times as they want until e.g. they hit the browser refresh button.
I've been looking everywhere for the answer to this problem- maybe your site and members is the one who can do it the random images are working as I want, EXCEPT, I want to make each one of these random images clickable to a url.It would be great if you knew. Also - if you know how to add a matching quote for each image right underneath it, that would be awesome, but having the clickable image is more important right now but I have not had any luck with matching up links and images in the 4 td cells.
On my website, I have random logos appear on the home page as products that I recommend. I would like to make these logos into links to the website they are from, so that when one clicks on the picture, it directs you to the site, but I can't quite get it to work, and I know very little about Javascript (as you may know from my previous question about Javascript).
Here's my current JS code:
<!-- // Set up the image files to be used. var theImages = new Array() // do not change this // To add more image files, continue with the
I have this script for putting up images at random, it works fine. I want to know how to put a link on each images, like if "image1.gif" is displayed, it links to "http://www.google.com", if "image2.gif" is displayed, it links to "hotmail.com", and so on. I attempted to figure out the problem myself, but the search was fruitless.
<script language="JavaScript"> <!-- function random_imglink(){ var myimages=new Array() myimages[1]="image1.gif" myimages[2]="image2.gif" myimages[3]="image3.gif" myimages[4]="image4.gif" myimages[5]="image5.gif" myimages[6]="image6.gif"
var ry=Math.floor(Math.random()*myimages.length) if (ry==0) ry=1 document.write('<img src="'+myimages[ry]+'" border=0>') } random_imglink() //--> </script>
I have a web page that contains a bunch of advertisements. What I need to do it randomly shuffle these images each time the page is refreshed. I cannot have any repeating ads.
I've been to many different site forums and have yet to have my questions answered completely maybe your site and members is the one who can do it.if you know how to add a matching quote for each image right underneath it, that would be awesome, but having the clickable image is more important right now.If its a new array, please show me exactly how it looks and where it goes in reference to this code if you'd be so kind.
New to javascript/jquery, been trying to create a rotator which displays a large image with caption and uses next/previous button and thumbnails for control. Everything works fine but when the rotator gets to the last item i'd like it to go back to the first, and when the previous button is clicked at the first item I'd like it to go to the last.
$(document).ready(function() { //set to zero var x = 0;
I've been searching the net for a while, for the easiest multiple random images code and found it. But now I've also been searching for a script to link all single images to a different link (link z1.jpg to home.html, z2.jpg to contact.html, x1 to banana.html, etc.).
This is the script I'm using:
Code: <script language="javascript"> <!-- var gallery = new Array(); gallery[0] = new Array("z1.jpg","z2.jpg","z3.jpg","z4.jpg","z5.jpg");
I need a script which click on random links on my webpage after page load?i have javascript code which open only link which i write in script but i want the code which click on any available link on my webpage the links change after every 10-15 seconds so i cant set a spacefic link in code...
I've been searching for a resolution to this issue for hours trying to customize my page located at [url]
Specifically, I'm trying to figure out why this line of code is not making my images display in the background:
Original plugin script provided here: [url]
<script>
I made adjustments with my image references that are all located in this directory: [url]
Problem: No images load, and I believe I don't fully understand the .appendTo tage.. I don't know if #body is correct. The author of the plugin assumed I understood the relation. Also #homePage may be incorrect as well.
Additionally, I found another plugin that worked for placing an image in the background (not random), and the background image would scale to size, according the users window. I loved that and it worked, just wanted to add random images to the same script.... first things first... I can't even get an image to display at all with the above code.
In case you wanted to know the script I was using to scale the background image, here it is below (although, as you will see in the code for my site - this image feature is disabled as I am trying to make adjustments).
code for image solutions used:
HTML
CSS
If I can get this second code to work with the random image plugin.
i cant get a caption specific to each image to display under the arrows when the image changes. it is especially hard for me because i have to edit the javascript which confuses the **** out of me. it seemed so simple....
ps i cant start an id with a digit? it doesnt seem to cause any problems...why is it stated that this cannot or shouldnot be done?