Skip to content
View in the app

A better way to browse. Learn more.

The Armory

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ANYONE THAT IS GOOD WITH HTML (GATOR PLZ HELP?)

Featured Replies

I'm trying to set up a random image script for a website, but none of the ones I find work. Anyone that could help please let me know. I'm trying to have at least 7 random images.tthanks in advance,Paradigm
You can't use HTML afaik. You need to use PHP. How do you do that? Hell if i know :D
Yeah, i didnt think you could generate that with html. Yes, as das said, i think php is the answer...but that is some complicated stuff.
DHTML is good, www.dynamicdrive.com Thousands of menus, form effects, interactive goodies etc etc and its all free...
  • Author
! I fixed the scrollbar issue.. thanks for help there i think..? Anyways on to the random image :D

I have here a little JavaScript that rotate a number (3) of pictures:

 

<SCRIPT LANGUAGE="JavaScript">

 

var number = 1;

 

function rotate() {

 

if (++number > 3) number = 1;

 

document.images[0].src = "picture" + number + ".jpg";

 

window.setTimeout('rotate();',8000);

 

}

 

</SCRIPT>

 

<BODY onLoad="window.setTimeout('rotate();',8000);">

 

the pictures must have the name picture1.jpg / picture2.jpg / picture3.jpg or you change the blue text...

 

hope it helps...

  • Author
Thanks panther, but it's really not what I'm looking for :\Anyone else able to help? :)
another question...do u want the pictures to change randomly without reloading the page, or a random picture shown at each new pageload ???u have to be a little more specific...but Clays answer and possible solution may be the easiest for u...
well...... with flash you could have it doing both, that's either a random image each pageload or a random image every so often.. but the images would have to be imbedded into the flash (well, technically they wouldn't, but it'd have to have a list of the images to choose from, which would make it more awkward to add new ones). javascript is... well... javascript. so it's sucky.php is the way to go. all you need to do is have a folder into which you shove all of the images you want it to reandomly select fromin this example the subfolder is "images"<?php$d=opendir(getcwd() . "/images");$filecount=0;$selected=0;$n=0;while($file=readdir($d)){ $filecount+=1;}rewinddir($d);$selected=mt_rand(3,$filecount);for($n=1;$n<=$selected;$n++){ $file=readdir($d);}echo "<img src='images/$file'>";?>so there you go... (i think) :slol
  • Author
It isn't for a sig.. just a random image to show up on the webpage, such as the "random images" in the top right on the armorys main page.
<script><!-- var pic, alt;pic = new Array;pic[0] = "pic1.jpg";pic[1] = "pic2.jpg";pic[2] = "pic3.jpg"; pic[3] = "pic4.jpg"; pic[4] = "pic5.jpg"; pic[5] = "pic6.jpg"; pic[6] = "pic7.jpg";alt = new Array;alt[0] = "";alt[1] = "";alt[2] = ""; var now = new Date();var seed = now.getTime() % 0xffffffff;function rand(n) {seed = (0x015a4e35 * seed) % 0x7fffffff;return ( seed >> 16 ) % n;} var num = rand(7);document.write("<img alt='" + alt[num] + "' name='main_image' src='" + pic[num] + "' width='569' height='334' usemap='#Map' border='0' ></a>"); //--></script>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.