473,387 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Help combining picture galleries

Hi All;

I am trying to combine to picture galleries onto te one page. But its
not quite working. Here is what I have so far.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Bow's and foggy's stored signatures</title>
<script type="text/javascript">
var picssigs = new
Array("sigs/finished1.jpg","sigs/foghorn.jpg","sigs/motto.jpg","sigs/sig.jpg","sigs/SWAT.jpg","sigs/title.gif");
var pictsigs = Math.round(Math.random()*(picssigs.length-1));
for (var i=0; i<picssigs.length; i++) {
var imgsigs = new Imagesig();
imgsigs.src = picssigs[i];
}
function viewsigs(whatsigs) {
if (whatsigs == "<<") {
pictsigs = 0;
} else if (whatsigs == "<") {
if (pictsigs > 0) pictsigs--;
} else if (whatsigs == ">") {
if (pictsigs < picssigs.length-1) pictsigs++;
} else if (whatsigs == ">>") {
pictsigs = picssigs.length-1;
}
document.images["imageviewersigs"].src = picssigs[pictsigs];
//window.status = "Picturesigs " + (pictsigs+1) + " of " +
picssigs.length;
//
document.getElementById("Fsigs").disabled = false;
document.getElementById("Psigs").disabled = false;
document.getElementById("Nsigs").disabled = false;
document.getElementById("Lsigs").disabled = false;
if (pictsigs == 0) {
document.getElementById("Fsigs").disabled = true;
document.getElementById("Psigs").disabled = true;
} else if (pictsigs == picssigs.length-1) {
document.getElementById("Nsigs").disabled = true;
document.getElementById("Lsigs").disabled = true;
}
}
var picsavs = new Array("avatars/160thsoar.gif",
"avatars/75thrgrrgt.gif", "avatars/avatart-head_banger.gif",
"avatars/soscom.gif", "avatars/syndrome.gif",

"avatars/usacapoc.gif", "avatars/usajfkswcs.gif",
"avatars/usasfc.gif", "avatars/usasoc.gif");
var pictavs = Math.round(Math.random()*(picsavs.length-1));
for (var j=0; j<picsavs.length; j++) {
var imgavs = new Imageavs();
imgavs.src = picsavs[j];
}
function viewavs(whatavs) {
if (whatavs == "<<") {
pictavs = 0;
} else if (whatavs == "<") {
if (pictavs > 0) pictavs--;
} else if (whatavs == ">") {
if (pictavs < picsavs.length-1) pictavs++;
} else if (whatavs == ">>") {
pictavs = picsavs.length-1;
}
document.images["imagevieweravs"].src = picsavs[pictavs];
//window.status = "Pictureavs " + (pictavs+1) + " of " +
picsavs.length;
//
document.getElementById("Favs").disabled = false;
document.getElementById("Pavs").disabled = false;
document.getElementById("Navs").disabled = false;
document.getElementById("Lavs").disabled = false;
if (pictavs == 0) {
document.getElementById("Favs").disabled = true;
document.getElementById("Pavs").disabled = true;
} else if (pictavs == picsavs.length-1) {
document.getElementById("Navs").disabled = true;
document.getElementById("Lavs").disabled = true;
}
}
</script>
</head>
<body onload="viewsigs('')" onload="viewavs('')"
"background="http://home.insightbb.com/clipart/backgrounds/bkgnd019.gif">

<h1 align="center">Bow's and foggy's stored grahics</h1>
<h2 align="center" style="color:red">Team Special Forces</h2>
<center>
<h1>sigs</h1>
<form>
<input type="button" value="First" id="Fsigs"
onclick="viewsigs('<<')">
<input type="button" value="Previous" id="Psigs"
onclick="viewsigs('<')">
<input type="button" value="Next" id="Nsigs"
onclick="viewsigs('>')">
<input type="button" value="Last" id="Lsigs"
onclick="viewsigs('>>')">
</form>
<table border="1">
<tr>
<td><img id="imageviewersigs" src=""></td>
</tr>
</table>
<p>If you have a sigs</p>
<p align="center">Then email it to us at <a
href="mailto:Bo*******@insightbb.com">Bo*******@in sightbb.com</a></p>
<h1>avatars</h1>
<form>
<input type="button" value="First" id="Favs"
onclick="viewavs('<<')">
<input type="button" value="Previous" id="Pavs"
onclick="viewavs('<')">
<input type="button" value="Next" id="Navs"
onclick="viewavs('>')">
<input type="button" value="Last" id="Lavs"
onclick="viewavs('>>')">
</form>
<table border="1">
<tr>
<td><img id="imagevieweravs" src=""></td>
</tr>
</table>
<p>If you have an avatars</p>
<p align="center">Then email it to us at <a
href="mailto:Bo*******@insightbb.com">Bo*******@in sightbb.com</a></p>
</center>
</body>
</html>
Regards David. E. Goble
http://degoble.customer.netspace.net.au
degoble[AT]netspace.net.au
Po Box 648 (9 Murray St), Kingscote, Kangaroo Island SA 5223
Jul 23 '05 #1
4 1717
Not sure exactly what your question is, but here's what I see after a
brief glance:
<body onload="viewsigs('')" onload="viewavs('')"
should read
<body onload="viewsigs('');viewavs('');"

But more importantly, you have two object constructor calls:
var imgsigs = new Imagesig();
var imgavs = new Imageavs();

but no constructors defined.

Did you mean to make them
var imgsigs = new Image();
var imgavs = new Image();

to pre-load the images?

If not, you'll need to define constructors that create Imagesigs and
Imageavs objects.

My guess is try that code change and you'll be good to go.

Jul 23 '05 #2
On 21 May 2005 06:35:19 -0700, "Random" <ra*******@gmail.com> wrote:
Not sure exactly what your question is, but here's what I see after a
brief glance:
<body onload="viewsigs('')" onload="viewavs('')"
should read
<body onload="viewsigs('');viewavs('');"

But more importantly, you have two object constructor calls:
var imgsigs = new Imagesig();
var imgavs = new Imageavs();

but no constructors defined.

Did you mean to make them
var imgsigs = new Image();
var imgavs = new Image();

My guess is try that code change and you'll be good to go.

Cool, that did the trick, thanks.
Regards David. E. Goble
http://degoble.customer.netspace.net.au
degoble[AT]netspace.net.au
Po Box 648 (9 Murray St), Kingscote, Kangaroo Island SA 5223
Jul 23 '05 #3
Ok that worked but when I added another oicture gallery, the initial
pictures do not load. They load when I click any of the buttons.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Bow's and foggy's stored signatures</title>
<script type="text/javascript">
var picssigs = new
Array("sigs/finished1.jpg","sigs/foghorn.jpg","sigs/motto.jpg","sigs/sig.jpg","sigs/SWAT.jpg","sigs/title.gif");
var pictsigs = Math.round(Math.random()*(picssigs.length-1));
for (var i=0; i<picssigs.length; i++) {
var imgsigs = new Image();
imgsigs.src = picssigs[i];
}
function viewsigs(whatsigs) {
if (whatsigs == "<<") {
pictsigs = 0;
} else if (whatsigs == "<") {
if (pictsigs > 0) pictsigs--;
} else if (whatsigs == ">") {
if (pictsigs < picssigs.length-1) pictsigs++;
} else if (whatsigs == ">>") {
pictsigs = picssigs.length-1;
}
document.images["imageviewersigs"].src = picssigs[pictsigs];
//window.status = "Picturesigs " + (pictsigs+1) + " of " +
picssigs.length;
//
document.getElementById("Fsigs").disabled = false;
document.getElementById("Psigs").disabled = false;
document.getElementById("Nsigs").disabled = false;
document.getElementById("Lsigs").disabled = false;
if (pictsigs == 0) {
document.getElementById("Fsigs").disabled = true;
document.getElementById("Psigs").disabled = true;
} else if (pictsigs == picssigs.length-1) {
document.getElementById("Nsigs").disabled = true;
document.getElementById("Lsigs").disabled = true;
}
function listsigs(whatsigs){
for (var i=0; i<picssigs.length; i++) {
document.images["imageviewersigs"].src = picssigs[i];
}
}
var picsavs = new Array("avatars/160thsoar.gif",
"avatars/75thrgrrgt.gif", "avatars/avatart-head_banger.gif",
"avatars/soscom.gif",

"avatars/syndrome.gif", "avatars/usacapoc.gif",
"avatars/usajfkswcs.gif", "avatars/usasfc.gif", "avatars/usasoc.gif");
var pictavs = Math.round(Math.random()*(picsavs.length-1));
for (var j=0; j<picsavs.length; j++) {
var imgavs = new Image();
imgavs.src = picsavs[j];
}
function viewavs(whatavs) {
if (whatavs == "<<") {
pictavs = 0;
} else if (whatavs == "<") {
if (pictavs > 0) pictavs--;
} else if (whatavs == ">") {
if (pictavs < picsavs.length-1) pictavs++;
} else if (whatavs == ">>") {
pictavs = picsavs.length-1;
}
document.images["imagevieweravs"].src = picsavs[pictavs];
//window.status = "Pictureavs " + (pictavs+1) + " of " +
picsavs.length;
//
document.getElementById("Favs").disabled = false;
document.getElementById("Pavs").disabled = false;
document.getElementById("Navs").disabled = false;
document.getElementById("Lavs").disabled = false;
if (pictavs == 0) {
document.getElementById("Favs").disabled = true;
document.getElementById("Pavs").disabled = true;
} else if (pictavs == picsavs.length-1) {
document.getElementById("Navs").disabled = true;
document.getElementById("Lavs").disabled = true;
}
}
var picssms = new Array("smiles/1luvu.gif", "smiles/1zhelp.gif",
"smiles/avatart-head_banger.gif", "smiles/2twocents.gif",

"smiles/syndrome.gif", "smiles/22_yikes.gif", "smiles/321.gif",
"smiles/a_plain.gif", "smiles/ak47.gif");
var pictsms = Math.round(Math.random()*(picssms.length-1));
for (var k=0; k<picssms.length; k++) {
var imgsms = new Image();
imgsms.src = picssms[k];
}
function viewsms(whatsms) {
if (whatsms == "<<") {
pictsms = 0;
} else if (whatsms == "<") {
if (pictsms > 0) pictsms--;
} else if (whatsms == ">") {
if (pictsms < picssms.length-1) pictsms++;
} else if (whatsms == ">>") {
pictsms = picssms.length-1;
}
document.images["imageviewersms"].src = picssms[pictsms];
//window.status = "Picturesms " + (pictsms+1) + " of " +
picssms.length;
//
document.getElementById("Fsms").disabled = false;
document.getElementById("Psms").disabled = false;
document.getElementById("Nsms").disabled = false;
document.getElementById("Lsms").disabled = false;
if (pictsms == 0) {
document.getElementById("Fsms").disabled = true;
document.getElementById("Psms").disabled = true;
} else if (pictsms == picssms.length-1) {
document.getElementById("Nsms").disabled = true;
document.getElementById("Lsms").disabled = true;
}
}
</script>
</head>
<body bgcolor="#ffffff" link="#0000ff" text="#000000" vlink="#ff0000"

background="http://home.insightbb.com/clipart/backgrounds/bkgnd019.gif"
onload="viewsigs(''), viewavs(''), viewsms('');">
<h1 align="center">Bow's and foggy's stored grahics</h1>
<h2 align="center" style="color: rgb(255, 0, 0);" color="red">Team
Special Forces</h2>
<table border="1" align="center">
<tr>
<td>
<center>
<h1>avatars</h1>
<form>
<input type="button" value="First" id="Favs"
onclick="viewavs('<<')">
<input type="button" value="Previous" id="Pavs"
onclick="viewavs('<')">
<input type="button" value="Next" id="Navs"
onclick="viewavs('>')">
<input type="button" value="Last" id="Lavs"
onclick="viewavs('>>')">
</form>
<table border="1">
<tr>
<td><img id="imagevieweravs" src=""></td>
</tr>
</table>
<p>If you have an avatar less than 80 x 80 pixels and smaller than
6kb</p>
</center>
</tb>
<td>
<center>
<h1>smilies</h1>
<form>
<input type="button" value="First" id="Fsms"
onclick="viewsms('<<')">
<input type="button" value="Previous" id="Psms"
onclick="viewsms('<')">
<input type="button" value="Next" id="Nsms"
onclick="viewsms('>')">
<input type="button" value="Last" id="Lsms"
onclick="viewsms('>>')">
</form>
<table border="1">
<tr>
<td><img id="imageviewersms" src=""></td>
</tr>
</table>
<p>If you have a smilely</p>
</center>
</tb>
<td>
<center>
<h1>sigs</h1>
<form>
<input type="button" value="First" id="Fsigs"
onclick="viewsigs('<<')">
<input type="button" value="Previous" id="Psigs"
onclick="viewsigs('<')">
<input type="button" value="Next" id="Nsigs"
onclick="viewsigs('>')">
<input type="button" value="Last" id="Lsigs"
onclick="viewsigs('>>')">
</form>
<table border="1">
<tr>
<td><img id="imageviewersigs" src=""></td>
</tr>
</table>
<p>If you have a sig less than 400 x 150 pixels</p>
</center>
</tb>
</tr>
</tr>
<td colspan="3" align="center">
<table align="center">
<tr>
<td>
<a href="/cgi-bin/GBEntry?owner=emailid">
<img src="/global-images/guestbook/sign_gb.jpg" border="0"></a>
</td>
<td>
<P>Then email it to us at <a
href="mailto:Bo*******@insightbb.com">Bo*******@in sightbb.com</a></p>
</td>
<td>
<a href="/cgi-bin/GBView?owner=emailid">
<img src="/global-images/guestbook/view_gb.jpg" border="0"></a>
</td>
</tr>
</table>
<p align="center">For viewing punkbuster screen shots see <A

href="http://http://degoble.customer.netspace.net.au/Pub/aa_files/pbss/">degoble.customer.netspace.net.au/Pub/aa_files/pbss</A>
<P><img src="/cgi-bin/counter.gif?fg=255,255,255&bg=0,0,0&counterid"
align="center">
</td>
</tr>
</table>
</body>
</html>
Regards David. E. Goble
http://degoble.customer.netspace.net.au
degoble[AT]netspace.net.au
Po Box 648 (9 Murray St), Kingscote, Kangaroo Island SA 5223
Jul 23 '05 #4
<body ... onload="viewsigs(''), viewavs(''), viewsms('');">

Try semicolons instead of commas.

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: the other john | last post by:
This should be fairly basic but I can't think of how to do this and I'm running out of time! I am developing a picture gallery and I can't figure out how to select "one" picture from each...
2
by: Martin Brunner | last post by:
Hello! I tested several picture galleries now but I didn't find anyone I like. It should be very simple (just login and upload) but it should be able to rezise pictures. You specify a value...
5
by: ech0 | last post by:
I would appreciate any help I can get in finding a solution to the following problem: ================================================================== Below is a diagram:...
13
by: matt | last post by:
I have this bit of code, that isn't valid, and I need some help getting it to work... Currently, I get an error because I am calling the next() function within a foreach loop. I am opening a flat...
1
by: Jungleman | last post by:
Here's a challenge for Javascript wizards! I have adapted an open source JS app here: http://www.walterzorn.com/dragdrop/d...eset/frame.htm It's pretty cool. But what I am trying to work out...
11
by: timmyb | last post by:
I have an image that is supposed to be in a centered div in the center of a page. It looks fine in IE7. But in Firefox, the image is pushed way over to the right. ...
0
nomad
by: nomad | last post by:
Hello Everyone. I founded an Flash and xml photo gallery. It works but I took it to another step What I want is to have six different galleries in one Flash file. I figure out how to do that but ...
0
by: aromes | last post by:
Hi, How to grab pictures out of online Flash image galleries? I will have the same question for hp/javascript online photo galleries as well (but will post them in their relevant sections unless...
1
by: dustylane | last post by:
I know very little about HTML and CSS but I've been able to decipher most of what I've needed to know based on trial and error. I had a friend coding me a website long ago and he abandoned the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.